Class Metadata.Revision

java.lang.Object
dev.metaschema.oscal.lib.model.Metadata.Revision
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject
Enclosing class:
Metadata

@MetaschemaAssembly(formalName="Revision History Entry", description="An entry in a sequential list of revisions to the containing document, expected to be in reverse chronological order (i.e. latest first).", name="revision", moduleClass=OscalMetadataModule.class, remarks="While `published`, `last-modified`, and `oscal-version` are not required, values for these entries should be provided if the information is known. A `link` with a `rel` of \"source\" should be provided if the information is known.", valueConstraints=@ValueConstraints(allowedValues=@AllowedValues(id="oscal-metadata-revision-link-rel-types",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="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)."),@AllowedValue(value="version-history",description="This link identifies a resource containing the version history of this document. Defined by [RFC 5829](https://tools.ietf.org/html/rfc5829).")}))) public static class Metadata.Revision extends Object implements dev.metaschema.core.model.IBoundObject
An entry in a sequential list of revisions to the containing document, expected to be in reverse chronological order (i.e. latest first).
  • Constructor Details

    • Revision

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

      public Revision(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.Metadata.Revision 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

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

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

      Returns:
      the title value, or null if not set
    • setTitle

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

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

      Parameters:
      value - the title value to set, or null to clear
    • 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

      @Nullable 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, or null if not set
    • setLastModified

      public void setLastModified(@Nullable 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, or null to clear
    • 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

      @Nullable 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, or null if not set
    • setOscalVersion

      public void setOscalVersion(@Nullable 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, or null to clear
    • 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
    • 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