Class ComponentDefinition

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

@MetaschemaAssembly(formalName="Component Definition", description="A collection of component descriptions, which may optionally be grouped by capability.", name="component-definition", moduleClass=OscalComponentDefinitionModule.class, rootName="component-definition", valueConstraints=@ValueConstraints(lets=@Let(name="all-imports",target="import-component-definition ! recurse-depth(\'doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(@href)))/component-definition\')")), modelConstraints=@AssemblyConstraints(index={@Index(id="oscal-index-system-component-uuid",level=ERROR,target="component",name="index-system-component-uuid",keyFields=@KeyField(target="@uuid"),remarks="Since multiple `component` entries can be provided, each component must have a unique `uuid`."),@Index(id="oscal-component-definition-index-metadata-scoped-role-id",formalName="In-Scope Role Identifiers",description="An index of role identifiers that are in-scope for the component-definition model. Roles are collected from imported component-definition. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.",level=ERROR,target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*",name="index-imports-metadata-role-id",keyFields=@KeyField(target="@id")),@Index(id="oscal-component-definition-index-metadata-scoped-location-uuid",level=ERROR,target="map:merge($all-imports/metadata/location ! map:entry(@uuid,.))?*",name="index-imports-metadata-location-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-component-definition-index-metadata-scoped-party-uuid",level=ERROR,target="map:merge($all-imports/metadata/party ! map:entry(@uuid,.))?*",name="index-imports-metadata-party-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-component-definition-index-metadata-scoped-party-organization-uuid",level=ERROR,target="map:merge($all-imports/metadata/party[@type=\'organization\'] ! map:entry(@uuid,.))?*",name="index-imports-metadata-party-organization-uuid",keyFields=@KeyField(target="@uuid")),@Index(id="oscal-component-definition-index-metadata-scoped-property-uuid",level=ERROR,target="map:merge($all-imports//prop[@uuid] ! map:entry(@uuid,.))?*",name="index-imports-metadata-property-uuid",keyFields=@KeyField(target="@uuid"))},unique={@IsUnique(id="oscal-unique-component-definition-capability",level=ERROR,target="capability",keyFields=@KeyField(target="@uuid"),remarks="A given `component` must not be referenced more than once within the same `capability`."),@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 ComponentDefinition extends AbstractOscalInstance implements dev.metaschema.core.model.IBoundObject
A collection of component descriptions, which may optionally be grouped by capability.
  • Constructor Details

    • ComponentDefinition

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

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

      Provides a globally unique means to identify a given component definition instance.

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

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

      Provides a globally unique means to identify a given component definition instance.

      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
    • getImportComponentDefinitions

      Get the "Import Component Definition".

      Loads a component definition from another resource.

      Returns:
      the import-component-definition value
    • setImportComponentDefinitions

      Set the "Import Component Definition".

      Loads a component definition from another resource.

      Parameters:
      value - the import-component-definition value to set
    • addImportComponentDefinition

      Add a new ImportComponentDefinition item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeImportComponentDefinition

      Remove the first matching ImportComponentDefinition item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getComponents

      @NonNull public List<DefinedComponent> getComponents()
      Get the "Component".

      A defined component that can be part of an implemented system.

      Returns:
      the component value
    • setComponents

      public void setComponents(@NonNull List<DefinedComponent> value)
      Set the "Component".

      A defined component that can be part of an implemented system.

      Parameters:
      value - the component value to set
    • addComponent

      public boolean addComponent(DefinedComponent item)
      Add a new DefinedComponent item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeComponent

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

      @NonNull public List<Capability> getCapabilities()
      Get the "Capability".

      A grouping of other components and/or capabilities.

      Returns:
      the capability value
    • setCapabilities

      public void setCapabilities(@NonNull List<Capability> value)
      Set the "Capability".

      A grouping of other components and/or capabilities.

      Parameters:
      value - the capability value to set
    • addCapability

      public boolean addCapability(Capability item)
      Add a new Capability item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeCapability

      public boolean removeCapability(Capability item)
      Remove the first matching Capability 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