Package gov.nist.secauto.oscal.lib.model
Class ControlPart
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.model.control.AbstractPart
-
- gov.nist.secauto.oscal.lib.model.ControlPart
-
- All Implemented Interfaces:
IPart
@MetaschemaAssembly(formalName="Part", description="An annotated, markup-based textual element of a control\'s or catalog group\'s definition, or a child of another part.", name="part", metaschema=OscalControlCommonMetaschema.class, remarks="A `part` provides for logical partitioning of prose, and can be thought of as a grouping structure (e.g., section). A `part` can have child parts allowing for arbitrary nesting of prose content (e.g., statement hierarchy). A `part` can contain `prop` objects that allow for enriching prose text with structured name/value information.\n\nA `part` can be assigned an optional `id`, which allows references to this part from within a catalog, or within an instance of another OSCAL model that has a need to reference the part. Examples of where part referencing is used in OSCAL include:\n\n- Referencing a part by id to tailor (make modifications to) a control statement in a profile.\n- Referencing a control statement represented by a part in a system security plan implemented-requirement where a statement-level response is desired.\n\nUse of `part` and `prop` provides for a wide degree of extensibility within the OSCAL catalog model. The optional `ns` provides a means to qualify a part\'s `name`, allowing for organization-specific vocabularies to be defined with clear semantics. Any organization that extends OSCAL in this way should consistently assign a `ns` value that represents the organization, making a given namespace qualified `name` unique to that organization. This allows the combination of `ns` and `name` to always be unique and unambiguous, even when mixed with extensions from other organizations. Each organization is responsible for governance of their own extensions, and is strongly encouraged to publish their extensions as standards to their user community. If no `ns` is provided, the name is expected to be in the \"OSCAL\" namespace.\n\nTo ensure a `ns` is unique to an organization and naming conflicts are avoided, a URI containing a DNS or other globally defined organization name should be used. For example, if FedRAMP and DoD both extend OSCAL, FedRAMP will use the `ns` `http://fedramp.gov/ns/oscal`, while DoD might use the `ns` `https://defense.gov` for any organization specific `name`.\n\nTools that process OSCAL content are not required to interpret unrecognized OSCAL extensions; however, OSCAL compliant tools should not modify or remove unrecognized extensions, unless there is a compelling reason to do so, such as data sensitivity.") @ValueConstraints(allowedValues=@AllowedValues(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values={@AllowedValue(value="label",description="A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases."),@AllowedValue(value="sort-id",description="An alternative identifier, whose value is easily sortable among other such values in the document."),@AllowedValue(value="alt-identifier",description="An alternate or aliased identifier for the parent context.")})) public class ControlPart extends AbstractPart
An annotated, markup-based textual element of a control's or catalog group's definition, or a child of another part.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nist.secauto.oscal.lib.model.control.AbstractPart
AbstractPart.Builder
-
-
Constructor Summary
Constructors Constructor Description ControlPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addLink(Link item)
Add a newLink
item to the underlying collection.boolean
addPart(ControlPart item)
Add a newControlPart
item to the underlying collection.boolean
addProp(Property item)
Add a newProperty
item to the underlying collection.String
getClazz()
String
getId()
List<Link>
getLinks()
String
getName()
URI
getNs()
List<ControlPart>
getParts()
List<Property>
getProps()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline
getProse()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine
getTitle()
boolean
removeLink(Link item)
Remove the first matchingLink
item from the underlying collection.boolean
removePart(ControlPart item)
Remove the first matchingControlPart
item from the underlying collection.boolean
removeProp(Property item)
Remove the first matchingProperty
item from the underlying collection.void
setClazz(String value)
void
setId(String value)
void
setLinks(List<Link> value)
void
setName(String value)
void
setNs(URI value)
void
setParts(List<ControlPart> value)
void
setProps(List<Property> value)
void
setProse(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
void
setTitle(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
String
toString()
-
Methods inherited from class gov.nist.secauto.oscal.lib.model.control.AbstractPart
builder, getInserts, getPartsRecursively
-
-
-
-
Constructor Detail
-
ControlPart
public ControlPart()
-
-
Method Detail
-
getTitle
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine getTitle()
-
setTitle
public void setTitle(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
-
addProp
public boolean addProp(Property item)
Add a newProperty
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeProp
public boolean removeProp(Property item)
Remove the first matchingProperty
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
getProse
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline getProse()
-
setProse
public void setProse(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
-
getParts
public List<ControlPart> getParts()
-
setParts
public void setParts(List<ControlPart> value)
-
addPart
public boolean addPart(ControlPart item)
Add a newControlPart
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removePart
public boolean removePart(ControlPart item)
Remove the first matchingControlPart
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
addLink
public boolean addLink(Link item)
Add a newLink
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeLink
public boolean removeLink(Link item)
Remove the first matchingLink
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
-