Class BackMatter.Resource

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

@MetaschemaAssembly(formalName="Resource", description="A resource associated with content in the containing document instance. A resource may be directly included in the document using base64 encoding or may point to one or more equivalent internet resources.", name="resource", moduleClass=OscalMetadataModule.class, remarks="A resource can be used in two ways. 1) it may point to an specific retrievable network resource using a `rlink`, or 2) it may be included as an attachment using a `base64`. A resource may contain multiple `rlink` and `base64` entries that represent alternative download locations (rlink) and attachments (base64) for the same resource.\n\nBoth rlink and base64 allow for a `media-type` to be specified, which is used to distinguish between different representations of the same resource (e.g., Microsoft Word, PDF). When multiple `rlink` and `base64` items are included for a given resource, all items must contain equivalent information. This allows the document consumer to choose a preferred item to process based on a the selected item\'s `media-type`. This is extremely important when the items represent OSCAL content that is represented in alternate formats (i.e., XML, JSON, YAML), allowing the same OSCAL data to be processed from any of the available formats indicated by the items.\n\nWhen a resource includes a citation, then the `title` and `citation` properties must both be included.", valueConstraints=@ValueConstraints(allowedValues={@AllowedValues(id="oscal-back-matter-resource-prop-name-values",level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values={@AllowedValue(value="type",description="Identifies the type of resource represented. The most specific appropriate type value SHOULD be used."),@AllowedValue(value="version",description="For resources representing a published document, this represents the version number of that document."),@AllowedValue(value="published",description="For resources representing a published document, this represents the publication date of that document.")}),@AllowedValues(id="oscal-back-matter-resource-prop-type-values",level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\') and @name=\'type\']/@value",values={@AllowedValue(value="logo",description="Indicates the resource is an organization\'s logo."),@AllowedValue(value="image",description="Indicates the resource represents an image."),@AllowedValue(value="screen-shot",description="Indicates the resource represents an image of screen content."),@AllowedValue(value="law",description="Indicates the resource represents an applicable law."),@AllowedValue(value="regulation",description="Indicates the resource represents an applicable regulation."),@AllowedValue(value="standard",description="Indicates the resource represents an applicable standard."),@AllowedValue(value="external-guidance",description="Indicates the resource represents applicable guidance."),@AllowedValue(value="acronyms",description="Indicates the resource provides a list of relevant acronyms."),@AllowedValue(value="citation",description="Indicates the resource cites relevant information."),@AllowedValue(value="policy",description="Indicates the resource is a policy."),@AllowedValue(value="procedure",description="Indicates the resource is a procedure."),@AllowedValue(value="system-guide",description="Indicates the resource is guidance document related to the subject system of an SSP."),@AllowedValue(value="users-guide",description="Indicates the resource is guidance document a user\'s guide or administrator\'s guide."),@AllowedValue(value="administrators-guide",description="Indicates the resource is guidance document a administrator\'s guide."),@AllowedValue(value="rules-of-behavior",description="Indicates the resource represents rules of behavior content."),@AllowedValue(value="plan",description="Indicates the resource represents a plan."),@AllowedValue(value="artifact",description="Indicates the resource represents an artifact, such as may be reviewed by an assessor."),@AllowedValue(value="evidence",description="Indicates the resource represents evidence, such as to support an assessment finding."),@AllowedValue(value="tool-output",description="Indicates the resource represents output from a tool."),@AllowedValue(value="raw-data",description="Indicates the resource represents machine data, which may require a tool or analysis for interpretation or presentation."),@AllowedValue(value="interview-notes",description="Indicates the resource represents notes from an interview, such as may be collected during an assessment."),@AllowedValue(value="questionnaire",description="Indicates the resource is a set of questions, possibly with responses."),@AllowedValue(value="report",description="Indicates the resource is a report."),@AllowedValue(value="agreement",description="Indicates the resource is a formal agreement between two or more parties.")})},matches=@Matches(id="oscal-back-matter-resource-prop-published-datatype",level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\') and @name=\'published\']/@value",typeAdapter=dev.metaschema.core.datatype.adapter.DateTimeWithTZAdapter.class),expect=@Expect(id="oscal-back-matter-resource-citation-title",description="A `title` is required when a `citation` is provided.",level=ERROR,target=".[citation]",test="title")), modelConstraints=@AssemblyConstraints(unique={@IsUnique(id="oscal-unique-resource-rlink-href",description="Ensure that each rlink item references a unique resource.",level=ERROR,target="rlink",keyFields={@KeyField(target="@href"),@KeyField(target="@media-type")}),@IsUnique(id="oscal-unique-resource-base64-filename",description="Ensure that all base64 resources have a unique `filename`.",level=ERROR,target="base64",keyFields=@KeyField(target="@filename"))},cardinality=@HasCardinality(id="oscal-back-matter-resource-base64-rlink-cardinality",description="A resource should provide at least an `rlink` or `base64` object.",level=WARNING,target="rlink|base64",minOccurs=1))) public static class BackMatter.Resource extends Object implements dev.metaschema.core.model.IBoundObject
A resource associated with content in the containing document instance. A resource may be directly included in the document using base64 encoding or may point to one or more equivalent internet resources.
  • Constructor Details

    • Resource

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

      public Resource(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.BackMatter.Resource 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
    • getUuid

      @NonNull public UUID getUuid()
      Get the "Resource Universally Unique Identifier".

      A unique identifier for a resource.

      Returns:
      the uuid value
    • setUuid

      public void setUuid(@NonNull UUID value)
      Set the "Resource Universally Unique Identifier".

      A unique identifier for a resource.

      Parameters:
      value - the uuid value to set
    • getTitle

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

      An optional name given to the resource, 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 "Resource Title".

      An optional name given to the resource, which may be used by a tool for display and navigation.

      Parameters:
      value - the title value to set, or null to clear
    • getDescription

      @Nullable public dev.metaschema.core.datatype.markup.MarkupMultiline getDescription()
      Get the "Resource Description".

      An optional short summary of the resource used to indicate the purpose of the resource.

      Returns:
      the description value, or null if not set
    • setDescription

      public void setDescription(@Nullable dev.metaschema.core.datatype.markup.MarkupMultiline value)
      Set the "Resource Description".

      An optional short summary of the resource used to indicate the purpose of the resource.

      Parameters:
      value - the description 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
    • 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
    • getCitation

      Get the "Citation".

      An optional citation consisting of end note text using structured markup.

      Returns:
      the citation value, or null if not set
    • setCitation

      public void setCitation(@Nullable BackMatter.Resource.Citation value)
      Set the "Citation".

      An optional citation consisting of end note text using structured markup.

      Parameters:
      value - the citation value to set, or null to clear
    • getRlinks

      Get the "Resource link".

      A URL-based pointer to an external resource with an optional hash for verification and change detection.

      Returns:
      the rlink value
    • setRlinks

      public void setRlinks(@NonNull List<BackMatter.Resource.Rlink> value)
      Set the "Resource link".

      A URL-based pointer to an external resource with an optional hash for verification and change detection.

      Parameters:
      value - the rlink value to set
    • addRlink

      public boolean addRlink(BackMatter.Resource.Rlink item)
      Add a new BackMatter.Resource.Rlink item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeRlink

      public boolean removeRlink(BackMatter.Resource.Rlink item)
      Remove the first matching BackMatter.Resource.Rlink item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getBase64

      Get the "Base64".

      A resource encoded using the Base64 alphabet defined by RFC 2045.

      Returns:
      the base64 value, or null if not set
    • setBase64

      public void setBase64(@Nullable BackMatter.Resource.Base64 value)
      Set the "Base64".

      A resource encoded using the Base64 alphabet defined by RFC 2045.

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