Class MappingCollection

java.lang.Object
dev.metaschema.oscal.lib.model.AbstractOscalInstance
dev.metaschema.oscal.lib.model.MappingCollection
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject, IOscalInstance

@MetaschemaAssembly(formalName="Mapping Collection", description="A collection of relationship-based control and/or control statement mappings.", name="mapping-collection", moduleClass=OscalMappingModule.class, rootName="mapping-collection", remarks="A mapping collection affirmatively declares the relationships that exist between sets of controls and/or control statements in a source and target. It is expected that inferences can be made based on what is mapped; however, no inferences should be made based on what is not mapped, since it is impossible to quantify how complete or granular a given mapping is.", modelConstraints=@AssemblyConstraints(index={@Index(id="oscal-mapping-collection-index-metadata-scoped-role-id",formalName="In-Scope Role Identifiers",description="An index of role identifiers that are in-scope for the mapping-collection model.",level=ERROR,target="metadata/role",name="index-imports-metadata-role-id",keyFields=@KeyField(target="@id")),@Index(id="oscal-mapping-collection-index-metadata-scoped-location-uuid",level=ERROR,target="metadata/location",name="index-imports-metadata-location-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-mapping-collection-index-metadata-scoped-party-uuid",level=ERROR,target="metadata/party",name="index-imports-metadata-party-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-mapping-collection-index-metadata-scoped-party-organization-uuid",level=ERROR,target="metadata/party[@type=\'organization\']",name="index-imports-metadata-party-organization-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-mapping-collection-index-metadata-scoped-property-uuid",level=ERROR,target=".//prop[@uuid]",name="index-imports-metadata-property-uuid",keyFields=@KeyField(target="@uuid"))},unique={@IsUnique(id="oscal-unique-document-id",formalName="Unique Document Identifier",description="Ensure all document identifiers have a unique combination of @scheme and value.",level=ERROR,target="document-id",keyFields={@KeyField(target="@scheme"),@KeyField}),@IsUnique(id="oscal-unique-property-in-context-location",formalName="Unique Properties",description="Ensure all properties are unique for a given location using a unique combination of @ns, @name, @class. @group. and @value.",level=ERROR,target=".//prop",keyFields={@KeyField(target="path(..)"),@KeyField(target="@name"),@KeyField(target="@ns"),@KeyField(target="@class"),@KeyField(target="@group"),@KeyField(target="@value")}),@IsUnique(id="oscal-unique-link-in-context-location",formalName="Unique Links",description="Ensure all links are unique for a given location using a unique combination of @href, @rel, and @media-type.",level=ERROR,target=".//link",keyFields={@KeyField(target="path(..)"),@KeyField(target="@href"),@KeyField(target="@rel"),@KeyField(target="@media-type"),@KeyField(target="@resource-fragment")}),@IsUnique(id="oscal-unique-responsibility-in-context-location",formalName="Unique Responsibilities",description="Ensure all responsible-roles and responsible-parties are unique for a given location using a unique combination of @role-id and the combination of @party-uuid values.",level=ERROR,target=".//(responsible-party|responsible-role)",keyFields={@KeyField(target="path(..)"),@KeyField(target="@role-id"),@KeyField(target="@party-uuid")},remarks="Since `responsible-party` and `responsible-role` associate multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")})) public class MappingCollection extends AbstractOscalInstance implements dev.metaschema.core.model.IBoundObject
A collection of relationship-based control and/or control statement mappings.
  • Constructor Details

    • MappingCollection

      Constructs a new dev.metaschema.oscal.lib.model.MappingCollection instance with no metadata.
    • MappingCollection

      public MappingCollection(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.MappingCollection 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 "Mapping Collection Universally Unique Identifier".

      A globally unique identifier with cross-instance scope for this catalog instance. This UUID should be changed when this document is revised.

      Specified by:
      getUuid in interface IOscalInstance
      Returns:
      the uuid value
    • setUuid

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

      A globally unique identifier with cross-instance scope for this catalog instance. This UUID should be changed when this document is revised.

      Parameters:
      value - the uuid value to set
    • getMetadata

      @NonNull public Metadata getMetadata()
      Get the "Document Metadata".

      Provides information about the containing document, and defines concepts that are shared across the document.

      Specified by:
      getMetadata in interface IOscalInstance
      Returns:
      the metadata value
    • setMetadata

      public void setMetadata(@NonNull Metadata value)
      Set the "Document Metadata".

      Provides information about the containing document, and defines concepts that are shared across the document.

      Parameters:
      value - the metadata value to set
    • getProvenance

      @NonNull public MappingProvenance getProvenance()
      Get the "Mapping Provenance".

      Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.

      Returns:
      the provenance value
    • setProvenance

      public void setProvenance(@NonNull MappingProvenance value)
      Set the "Mapping Provenance".

      Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.

      Parameters:
      value - the provenance value to set
    • getMappings

      @NonNull public List<Mapping> getMappings()
      Get the "Control Mapping".

      A mapping between two target resources.

      Returns:
      the mapping value
    • setMappings

      public void setMappings(@NonNull List<Mapping> value)
      Set the "Control Mapping".

      A mapping between two target resources.

      Parameters:
      value - the mapping value to set
    • addMapping

      public boolean addMapping(Mapping item)
      Add a new Mapping item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeMapping

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

      @Nullable public BackMatter getBackMatter()
      Get the "Back matter".

      A collection of resources that may be referenced from within the OSCAL document instance.

      Specified by:
      getBackMatter in interface IOscalInstance
      Returns:
      the back-matter value, or null if not set
    • setBackMatter

      public void setBackMatter(@Nullable BackMatter value)
      Set the "Back matter".

      A collection of resources that may be referenced from within the OSCAL document instance.

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

      public String toString()
      Overrides:
      toString in class Object