Package gov.nist.secauto.oscal.lib.model
Class MappingCollection
java.lang.Object
gov.nist.secauto.oscal.lib.model.MappingCollection
- All Implemented Interfaces:
gov.nist.secauto.metaschema.core.model.IBoundObject
@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 Object
implements gov.nist.secauto.metaschema.core.model.IBoundObject
A collection of relationship-based control and/or control statement mappings.
-
Constructor Summary
ConstructorsConstructorDescriptionMappingCollection(gov.nist.secauto.metaschema.core.model.IMetaschemaData data) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMapping(Mapping item) Add a newMappingitem to the underlying collection.gov.nist.secauto.metaschema.core.model.IMetaschemaDatagetUuid()booleanremoveMapping(Mapping item) Remove the first matchingMappingitem from the underlying collection.voidsetBackMatter(BackMatter value) voidsetMappings(List<Mapping> value) voidsetMetadata(Metadata value) voidsetProvenance(MappingProvenance value) voidtoString()
-
Constructor Details
-
MappingCollection
public MappingCollection() -
MappingCollection
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacegov.nist.secauto.metaschema.core.model.IBoundObject
-
getUuid
-
setUuid
-
getMetadata
-
setMetadata
-
getProvenance
-
setProvenance
-
getMappings
-
setMappings
-
addMapping
Add a newMappingitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeMapping
Remove the first matchingMappingitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getBackMatter
-
setBackMatter
-
toString
-