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:
gov.nist.secauto.metaschema.core.model.IBoundObject
,ILink
@MetaschemaAssembly(formalName="Link",
description="A reference to a local or remote resource, that has a specific relation to the containing object.",
name="link",
moduleClass=OscalMetadataModule.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=@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.core.datatype.adapter.UriReferenceAdapter.class),@Matches(level=ERROR,target=".[@rel=(\'reference\') and not(starts-with(@href,\'#\'))]/@href",typeAdapter=gov.nist.secauto.metaschema.core.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(description="A local reference SHOULD NOT have a media-type.",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
implements gov.nist.secauto.metaschema.core.model.IBoundObject
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
-
Method Summary
Modifier and TypeMethodDescriptiongetHref()
gov.nist.secauto.metaschema.core.model.IMetaschemaData
getRel()
gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine
getText()
void
void
setMediaType
(String value) void
void
setResourceFragment
(String value) void
setText
(gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine value) toString()
Methods inherited from class gov.nist.secauto.oscal.lib.model.metadata.AbstractLink
builder, merge
-
Constructor Details
-
Link
public Link() -
Link
-
-
Method Details