Class 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.