Class Metadata

All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject, IMetadata

@MetaschemaAssembly(formalName="Document Metadata", description="Provides information about the containing document, and defines concepts that are shared across the document.", name="metadata", moduleClass=OscalMetadataModule.class, remarks="All OSCAL documents use the same metadata structure, that provides a consistent way of expressing OSCAL document metadata across all OSCAL models. The metadata section also includes declarations of individual objects (i.e., roles, location, parties) that may be referenced within and across linked OSCAL documents.\n\nThe metadata in an OSCAL document has few required fields, representing only the bare minimum data needed to differentiate one instance from another. Tools and users creating OSCAL documents may choose to use any of the optional fields, as well as extension mechanisms (e.g., properties, links) to go beyond this minimum to suit their use cases.\n\nA publisher of OSCAL content can use the `published`, `last-modified`, and `version` fields to establish information about an individual in a sequence of successive revisions of a given OSCAL-based publication. The metadata for a previous revision can be represented as a `revision` within this object. Links may also be provided using the `predecessor-version` and `successor-version` link relations to provide for direct access to the related resource. These relations can be provided as a link child of this object or as `link` within a given `revision`.\n\nA `responsible-party` entry in this context refers to roles and parties that have responsibility relative to the production, review, publication, and use of the containing document.", valueConstraints=@AllowedValues(id="oscal-metadata-responsible-party-role-ids",level=ERROR,target="responsible-party/@role-id",allowOthers=true,values={@AllowedValue(value="creator",description="Indicates the person or organization that created this content."),@AllowedValue(value="prepared-by",description="Indicates the person or organization that prepared this content."),@AllowedValue(value="prepared-for",description="Indicates the person or organization for which this content was created."),@AllowedValue(value="content-approver",description="Indicates the person or organization responsible for all content represented in the \"document\"."),@AllowedValue(value="contact",description="Indicates the person or organization to contact for questions or support related to this content.")}) @AllowedValues(id="oscal-metadata-prop-name-values",level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values=@AllowedValue(value="keywords",description="The value identifies a comma-seperated listing of keywords associated with this content. These keywords may be used as search terms for indexing and other applications.")) @AllowedValues(id="oscal-metadata-link-rel-values",level=ERROR,target="link/@rel",allowOthers=true,values={@AllowedValue(value="canonical",description="The link identifies the authoritative location for this resource. Defined by [RFC 6596](https://tools.ietf.org/html/rfc6596)."),@AllowedValue(value="alternate",description="The link identifies an alternative location or format for this resource. Defined by [the HTML Living Standard](https://html.spec.whatwg.org/multipage/links.html#linkTypes)"),@AllowedValue(value="latest-version",description="This link identifies a resource containing the latest version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829)."),@AllowedValue(value="predecessor-version",description="This link identifies a resource containing the predecessor version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829)."),@AllowedValue(value="successor-version",description="This link identifies a resource containing the predecessor version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829).")}) @AllowedValues(id="oscal-metadata-allowed-roles",formalName="Standard Role Identifiers",description="The values provided here represent standardized role identifiers for common roles.",level=ERROR,target="responsible-party/@role-id",allowOthers=true,values={@AllowedValue(value="creator",description="Indicates the organization that created this content."),@AllowedValue(value="prepared-by",description="Indicates the organization that prepared this content."),@AllowedValue(value="prepared-for",description="Indicates the organization for which this content was created."),@AllowedValue(value="content-approver",description="Indicates the organization responsible for all content represented in the \"document\"."),@AllowedValue(value="contact",description="Indicates the organization to contact for questions or support related to this content.")}) @AllowedValues(id="oscal-metadata-allowed-props",formalName="Metadata Keywords Property",level=ERROR,target="prop[not(@ns) or @ns=\'http://csrc.nist.gov/ns/oscal\']/@name",values=@AllowedValue(value="keywords",description="The value identifies a comma-separated listing of keywords associated with this content. These keywords may be used as search terms for indexing and other applications.")) @AllowedValues(id="oscal-allowed-link-rels",formalName="Standard Metadata Link Relations",level=ERROR,target="link/@rel",allowOthers=true,values={@AllowedValue(value="canonical",description="The link identifies the authoritative location for this file. Defined by [RFC 6596](https://tools.ietf.org/html/rfc6596)."),@AllowedValue(value="alternate",description="The link identifies an alternative location or format for this file. Defined by [the HTML Living Standard](https://html.spec.whatwg.org/multipage/links.html#linkTypes)"),@AllowedValue(value="latest-version",description="This link identifies a resource containing the latest version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829)."),@AllowedValue(value="predecessor-version",description="This link identifies a resource containing the predecessor version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829)."),@AllowedValue(value="successor-version",description="This link identifies a resource containing the predecessor version in the version history. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829).")}), modelConstraints=@AssemblyConstraints(index={@Index(id="oscal-index-metadata-roles",level=ERROR,target="role",name="index-metadata-role-ids",keyFields=@KeyField(target="@id")),@Index(id="oscal-index-metadata-property-uuid",level=ERROR,target=".//prop",name="index-metadata-property-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-index-metadata-role-id",level=ERROR,target="role",name="index-metadata-role-id",keyFields=@KeyField(target="@id")),@Index(id="oscal-index-metadata-location-uuid",level=ERROR,target="location",name="index-metadata-location-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-index-metadata-party-uuid",level=ERROR,target="party",name="index-metadata-party-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-index-metadata-party-organizations-uuid",level=ERROR,target="party[@type=\'organization\']",name="index-metadata-party-organizations-uuid",keyFields=@KeyField(target="@uuid"))},unique={@IsUnique(id="oscal-unique-metadata-doc-id",level=ERROR,target="document-id",keyFields={@KeyField(target="@scheme"),@KeyField}),@IsUnique(id="oscal-unique-metadata-property",level=ERROR,target="prop",keyFields={@KeyField(target="@name"),@KeyField(target="@ns"),@KeyField(target="@class"),@KeyField(target="@group"),@KeyField(target="@value")}),@IsUnique(id="oscal-unique-metadata-link",level=ERROR,target="link",keyFields={@KeyField(target="@href"),@KeyField(target="@rel"),@KeyField(target="@media-type")}),@IsUnique(id="oscal-unique-metadata-responsible-party",level=ERROR,target="responsible-party",keyFields=@KeyField(target="@role-id"),remarks="Since `responsible-party` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once."),@IsUnique(id="oscal-metadata-unique-document-id",level=ERROR,target="document-id",keyFields={@KeyField(target="@scheme"),@KeyField},remarks="The combination of `scheme` and the field value must be unique.")})) public class Metadata extends AbstractMetadata implements dev.metaschema.core.model.IBoundObject
Provides information about the containing document, and defines concepts that are shared across the document.
  • Constructor Details

    • Metadata

      public Metadata()
      Constructs a new dev.metaschema.oscal.lib.model.Metadata instance with no metadata.
    • Metadata

      public Metadata(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.Metadata instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public dev.metaschema.core.model.IMetaschemaData getMetaschemaData()
      Specified by:
      getMetaschemaData in interface dev.metaschema.core.model.IBoundObject
    • getTitle

      @NonNull public dev.metaschema.core.datatype.markup.MarkupLine getTitle()
      Get the "Document Title".

      A name given to the document, which may be used by a tool for display and navigation.

      Returns:
      the title value
    • setTitle

      public void setTitle(@NonNull dev.metaschema.core.datatype.markup.MarkupLine value)
      Set the "Document Title".

      A name given to the document, which may be used by a tool for display and navigation.

      Parameters:
      value - the title value to set
    • getPublished

      @Nullable public ZonedDateTime getPublished()
      Get the "Publication Timestamp".

      The date and time the document was last made available.

      Returns:
      the published value, or null if not set
    • setPublished

      public void setPublished(@Nullable ZonedDateTime value)
      Set the "Publication Timestamp".

      The date and time the document was last made available.

      Parameters:
      value - the published value to set, or null to clear
    • getLastModified

      @NonNull public ZonedDateTime getLastModified()
      Get the "Last Modified Timestamp".

      The date and time the document was last stored for later retrieval.

      Returns:
      the last-modified value
    • setLastModified

      public void setLastModified(@NonNull ZonedDateTime value)
      Set the "Last Modified Timestamp".

      The date and time the document was last stored for later retrieval.

      Parameters:
      value - the last-modified value to set
    • getVersion

      @NonNull public String getVersion()
      Get the "Document Version".

      Used to distinguish a specific revision of an OSCAL document from other previous and future versions.

      Returns:
      the version value
    • setVersion

      public void setVersion(@NonNull String value)
      Set the "Document Version".

      Used to distinguish a specific revision of an OSCAL document from other previous and future versions.

      Parameters:
      value - the version value to set
    • getOscalVersion

      @NonNull public String getOscalVersion()
      Get the "OSCAL Version".

      The OSCAL model version the document was authored against and will conform to as valid.

      Returns:
      the oscal-version value
    • setOscalVersion

      public void setOscalVersion(@NonNull String value)
      Set the "OSCAL Version".

      The OSCAL model version the document was authored against and will conform to as valid.

      Parameters:
      value - the oscal-version value to set
    • getRevisions

      @NonNull public List<Metadata.Revision> getRevisions()
      Get the "Revision History Entry".

      An entry in a sequential list of revisions to the containing document, expected to be in reverse chronological order (i.e. latest first).

      Returns:
      the revision value
    • setRevisions

      public void setRevisions(@NonNull List<Metadata.Revision> value)
      Set the "Revision History Entry".

      An entry in a sequential list of revisions to the containing document, expected to be in reverse chronological order (i.e. latest first).

      Parameters:
      value - the revision value to set
    • addRevision

      public boolean addRevision(Metadata.Revision item)
      Add a new Metadata.Revision item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeRevision

      public boolean removeRevision(Metadata.Revision item)
      Remove the first matching Metadata.Revision item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getDocumentIds

      @NonNull public List<DocumentId> getDocumentIds()
      Get the "Document Identifier".

      A document identifier qualified by an identifier scheme.

      Returns:
      the document-id value
    • setDocumentIds

      public void setDocumentIds(@NonNull List<DocumentId> value)
      Set the "Document Identifier".

      A document identifier qualified by an identifier scheme.

      Parameters:
      value - the document-id value to set
    • addDocumentId

      public boolean addDocumentId(DocumentId item)
      Add a new DocumentId item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeDocumentId

      public boolean removeDocumentId(DocumentId item)
      Remove the first matching DocumentId item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getProps

      @NonNull public List<Property> getProps()
      Get the "Property".

      An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.

      Returns:
      the prop value
    • setProps

      public void setProps(@NonNull List<Property> value)
      Set the "Property".

      An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.

      Parameters:
      value - the prop value to set
    • addProp

      public boolean addProp(Property item)
      Add a new Property item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeProp

      public boolean removeProp(Property item)
      Remove the first matching Property item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getLinks

      @NonNull public List<Link> getLinks()
      Get the "Link".

      A reference to a local or remote resource, that has a specific relation to the containing object.

      Returns:
      the link value
    • setLinks

      public void setLinks(@NonNull List<Link> value)
      Set the "Link".

      A reference to a local or remote resource, that has a specific relation to the containing object.

      Parameters:
      value - the link value to set
    • addLink

      public boolean addLink(Link item)
      Add a new Link item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeLink

      public boolean removeLink(Link item)
      Remove the first matching Link item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getRoles

      @NonNull public List<Metadata.Role> getRoles()
      Get the "Role".

      Defines a function, which might be assigned to a party in a specific situation.

      Specified by:
      getRoles in interface IMetadata
      Returns:
      the role value
    • setRoles

      public void setRoles(@NonNull List<Metadata.Role> value)
      Set the "Role".

      Defines a function, which might be assigned to a party in a specific situation.

      Parameters:
      value - the role value to set
    • addRole

      public boolean addRole(Metadata.Role item)
      Add a new Metadata.Role item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeRole

      public boolean removeRole(Metadata.Role item)
      Remove the first matching Metadata.Role item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getLocations

      @NonNull public List<Metadata.Location> getLocations()
      Get the "Location".

      A physical point of presence, which may be associated with people, organizations, or other concepts within the current or linked OSCAL document.

      Specified by:
      getLocations in interface IMetadata
      Returns:
      the location value
    • setLocations

      public void setLocations(@NonNull List<Metadata.Location> value)
      Set the "Location".

      A physical point of presence, which may be associated with people, organizations, or other concepts within the current or linked OSCAL document.

      Parameters:
      value - the location value to set
    • addLocation

      public boolean addLocation(Metadata.Location item)
      Add a new Metadata.Location item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeLocation

      public boolean removeLocation(Metadata.Location item)
      Remove the first matching Metadata.Location item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getParties

      @NonNull public List<Metadata.Party> getParties()
      Get the "Party".

      An organization or person, which may be associated with roles or other concepts within the current or linked OSCAL document.

      Specified by:
      getParties in interface IMetadata
      Returns:
      the party value
    • setParties

      public void setParties(@NonNull List<Metadata.Party> value)
      Set the "Party".

      An organization or person, which may be associated with roles or other concepts within the current or linked OSCAL document.

      Parameters:
      value - the party value to set
    • addParty

      public boolean addParty(Metadata.Party item)
      Add a new Metadata.Party item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeParty

      public boolean removeParty(Metadata.Party item)
      Remove the first matching Metadata.Party item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getResponsibleParties

      Get the "Responsible Party".

      A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.

      Returns:
      the responsible-party value
    • setResponsibleParties

      public void setResponsibleParties(@NonNull List<ResponsibleParty> value)
      Set the "Responsible Party".

      A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.

      Parameters:
      value - the responsible-party value to set
    • addResponsibleParty

      public boolean addResponsibleParty(ResponsibleParty item)
      Add a new ResponsibleParty item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeResponsibleParty

      Remove the first matching ResponsibleParty item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getActions

      @NonNull public List<Action> getActions()
      Get the "Action".

      An action applied by a role within a given party to the content.

      Returns:
      the action value
    • setActions

      public void setActions(@NonNull List<Action> value)
      Set the "Action".

      An action applied by a role within a given party to the content.

      Parameters:
      value - the action value to set
    • addAction

      public boolean addAction(Action item)
      Add a new Action item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeAction

      public boolean removeAction(Action item)
      Remove the first matching Action item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getRemarks

      @Nullable public dev.metaschema.core.datatype.markup.MarkupMultiline getRemarks()
      Get the "Remarks".

      Additional commentary about the containing object.

      Returns:
      the remarks value, or null if not set
    • setRemarks

      public void setRemarks(@Nullable dev.metaschema.core.datatype.markup.MarkupMultiline value)
      Set the "Remarks".

      Additional commentary about the containing object.

      Parameters:
      value - the remarks value to set, or null to clear
    • toString

      public String toString()
      Overrides:
      toString in class Object