Package gov.nist.secauto.oscal.lib.model
Class Link
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.model.metadata.AbstractLink
-
- gov.nist.secauto.oscal.lib.model.Link
-
- All Implemented Interfaces:
ILink
@MetaschemaAssembly(formalName="Link", description="A reference to a local or remote resource, that has a specific relation to the containing object.", name="link", metaschema=OscalMetadataMetaschema.class, remarks="To provide a cryptographic hash for a remote target resource, a local reference to a back matter `resource` is needed. The resource allows one or more hash values to be provided using the `rlink/hash` object.\n\nThe OSCAL `link` is a roughly based on the HTML [link element](https://www.w3.org/TR/html401/struct/links.html#edef-LINK).") @ValueConstraints(indexHasKey=@IndexHasKey(level=ERROR,target=".[@rel=(\'reference\') and starts-with(@href,\'#\')]",indexName="index-back-matter-resource",keyFields=@KeyField(target="@href",pattern="#(.*)")),matches={@Matches(level=ERROR,target=".[@rel=(\'reference\') and starts-with(@href,\'#\')]/@href",typeAdapter=gov.nist.secauto.metaschema.model.common.datatype.adapter.UriReferenceAdapter.class),@Matches(level=ERROR,target=".[@rel=(\'reference\') and not(starts-with(@href,\'#\'))]/@href",typeAdapter=gov.nist.secauto.metaschema.model.common.datatype.adapter.UriAdapter.class),@Matches(level=ERROR,target="@resource-fragment",pattern="(?:[0-9a-zA-Z-._~/?!$&\'()*+,;=:@]|%[0-9A-F][0-9A-F])+",remarks="This pattern is based on the fragment Augmented Backus-Naur form (ABNF) syntax provided in \\[RFC3986 section 3.5\\](https://www.rfc-editor.org/rfc/rfc3986#section-3.5). Uppercase alpha hex digits are required, which is the preferred normalized form defined in RFC3986.")},expect=@Expect(level=ERROR,target=".[starts-with(@href,\'#\')]",test="not(exists(@media-type))",remarks="Since both `link` and `back-matter/resource` both allow specification of a `media-type`, the `media-type` on `link` may conflict with the any `media-type` entries on a resource\'s `rlink` or `base64` objects. This constraint prevents this from occurring.")) public class Link extends AbstractLink
A reference to a local or remote resource, that has a specific relation to the containing object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nist.secauto.oscal.lib.model.metadata.AbstractLink
AbstractLink.Builder
-
-
Constructor Summary
Constructors Constructor Description Link()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getHref()
String
getMediaType()
String
getRel()
String
getResourceFragment()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine
getText()
void
setHref(URI value)
void
setMediaType(String value)
void
setRel(String value)
void
setResourceFragment(String value)
void
setText(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
String
toString()
-
Methods inherited from class gov.nist.secauto.oscal.lib.model.metadata.AbstractLink
builder, merge
-
-
-
-
Constructor Detail
-
Link
public Link()
-
-
Method Detail
-
getMediaType
public String getMediaType()
-
setMediaType
public void setMediaType(String value)
-
getResourceFragment
public String getResourceFragment()
-
setResourceFragment
public void setResourceFragment(String value)
-
getText
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine getText()
-
setText
public void setText(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
-
-