Package gov.nist.secauto.oscal.lib.model
Class Catalog
java.lang.Object
gov.nist.secauto.oscal.lib.model.AbstractOscalInstance
gov.nist.secauto.oscal.lib.model.control.catalog.AbstractCatalog
gov.nist.secauto.oscal.lib.model.Catalog
- All Implemented Interfaces:
gov.nist.secauto.metaschema.core.model.IBoundObject,ICatalog,IControlContainer,IGroupContainer,IOscalInstance
@MetaschemaAssembly(formalName="Catalog",
description="A structured, [organized collection](https://pages.nist.gov/OSCAL/concepts/terminology/#catalog) of control information.",
name="catalog",
moduleClass=OscalCatalogModule.class,
rootName="catalog",
remarks="Catalogs may use one or more `group` objects to subdivide the control contents of a catalog.",
valueConstraints=@AllowedValues(level=ERROR,target="metadata/prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values={@AllowedValue(value="resolution-tool",description="The tool used to produce a resolved profile."),@AllowedValue(value="source-profile-uuid",description="The document-level `uuid` of the source profile from which the catalog was produced by [profile resolution](https://pages.nist.gov/OSCAL/concepts/processing/profile-resolution/).")}) @AllowedValues(level=ERROR,target="metadata/link/@rel",allowOthers=true,values={@AllowedValue(value="source-profile",description="The profile from which the catalog was produced by [profile resolution](https://pages.nist.gov/OSCAL/concepts/processing/profile-resolution/)."),@AllowedValue(value="source-profile-uuid",description="The document-level `uuid` of the profile from which the catalog was produced by [profile resolution](https://pages.nist.gov/OSCAL/concepts/processing/profile-resolution/).")}),
modelConstraints=@AssemblyConstraints(index={@Index(level=ERROR,target="//part",name="catalog-parts",keyFields=@KeyField(target="@id")),@Index(level=ERROR,target="//prop",name="catalog-props",keyFields=@KeyField(target="@uuid")),@Index(level=ERROR,target="//(control|group|part)",name="catalog-groups-controls-parts",keyFields=@KeyField(target="@id")),@Index(level=ERROR,target="//control",name="catalog-controls",keyFields=@KeyField(target="@id")),@Index(level=ERROR,target="//param",name="catalog-params",keyFields=@KeyField(target="@id")),@Index(level=ERROR,target="//group",name="catalog-groups",keyFields=@KeyField(target="@id")),@Index(id="oscal-catalog-index-metadata-scoped-metadata-role-id",formalName="In-Scope Role Identifiers",description="An index of role identifiers that are in-scope for the catalog model.",level=ERROR,target="metadata/role",name="index-imports-metadata-role-id",keyFields=@KeyField(target="@id")),@Index(id="oscal-catalog-index-metadata-scoped-location-uuid",level=ERROR,target="metadata/location",name="index-imports-metadata-location-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-catalog-index-metadata-scoped-party-uuid",level=ERROR,target="metadata/party",name="index-imports-metadata-party-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-catalog-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-catalog-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 Catalog
extends AbstractCatalog
implements gov.nist.secauto.metaschema.core.model.IBoundObject
A structured, organized collection of control information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddControl(Control item) Add a newControlitem to the underlying collection.booleanaddGroup(CatalogGroup item) Add a newCatalogGroupitem to the underlying collection.booleanAdd a newParameteritem to the underlying collection.gov.nist.secauto.metaschema.core.model.IMetaschemaDatagetUuid()booleanremoveControl(Control item) Remove the first matchingControlitem from the underlying collection.booleanremoveGroup(CatalogGroup item) Remove the first matchingCatalogGroupitem from the underlying collection.booleanremoveParam(Parameter item) Remove the first matchingParameteritem from the underlying collection.voidsetBackMatter(BackMatter value) voidsetControls(List<Control> value) voidsetGroups(List<CatalogGroup> value) voidsetMetadata(Metadata value) voidvoidtoString()Methods inherited from class gov.nist.secauto.oscal.lib.model.control.catalog.AbstractCatalog
getReferencedParameterIdsMethods inherited from class gov.nist.secauto.oscal.lib.model.AbstractOscalInstance
getResourceByUuid
-
Constructor Details
-
Catalog
public Catalog() -
Catalog
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacegov.nist.secauto.metaschema.core.model.IBoundObject
-
getUuid
- Specified by:
getUuidin interfaceIOscalInstance
-
setUuid
-
getMetadata
- Specified by:
getMetadatain interfaceIOscalInstance
-
setMetadata
-
getParams
- Specified by:
getParamsin interfaceIControlContainer
-
setParams
-
addParam
Add a newParameteritem to the underlying collection.- Specified by:
addParamin interfaceIControlContainer- Parameters:
item- the item to add- Returns:
true
-
removeParam
Remove the first matchingParameteritem from the underlying collection.- Specified by:
removeParamin interfaceIControlContainer- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getControls
- Specified by:
getControlsin interfaceIControlContainer
-
setControls
-
addControl
Add a newControlitem to the underlying collection.- Specified by:
addControlin interfaceIControlContainer- Parameters:
item- the item to add- Returns:
true
-
removeControl
Remove the first matchingControlitem from the underlying collection.- Specified by:
removeControlin interfaceIControlContainer- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getGroups
- Specified by:
getGroupsin interfaceIGroupContainer
-
setGroups
-
addGroup
Add a newCatalogGroupitem to the underlying collection.- Specified by:
addGroupin interfaceIGroupContainer- Parameters:
item- the item to add- Returns:
true
-
removeGroup
Remove the first matchingCatalogGroupitem from the underlying collection.- Specified by:
removeGroupin interfaceIGroupContainer- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getBackMatter
- Specified by:
getBackMatterin interfaceIOscalInstance
-
setBackMatter
-
toString
-