Package gov.nist.secauto.oscal.lib.model
Class BackMatter.Resource
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.model.BackMatter.Resource
-
- Enclosing class:
- BackMatter
@MetaschemaAssembly(formalName="Resource", description="A resource associated with content in the containing document instance. A resource may be directly included in the document using base64 encoding or may point to one or more equivalent internet resources.", name="resource", metaschema=OscalMetadataMetaschema.class, remarks="A resource can be used in two ways. 1) it may point to an specific retrievable network resource using a `rlink`, or 2) it may be included as an attachment using a `base64`. A resource may contain multiple `rlink` and `base64` entries that represent alternative download locations (rlink) and attachments (base64) for the same resource.\n\nBoth rlink and base64 allow for a `media-type` to be specified, which is used to distinguish between different representations of the same resource (e.g., Microsoft Word, PDF). When multiple `rlink` and `base64` items are included for a given resource, all items must contain equivalent information. This allows the document consumer to choose a preferred item to process based on a the selected item\'s `media-type`. This is extremely important when the items represent OSCAL content that is represented in alternate formats (i.e., XML, JSON, YAML), allowing the same OSCAL data to be processed from any of the available formats indicated by the items.\n\nWhen a resource includes a citation, then the `title` and `citation` properties must both be included.") @ValueConstraints(allowedValues={@AllowedValues(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values={@AllowedValue(value="type",description="Identifies the type of resource represented. The most specific appropriate type value SHOULD be used."),@AllowedValue(value="version",description="For resources representing a published document, this represents the version number of that document."),@AllowedValue(value="published",description="For resources representing a published document, this represents the publication date of that document.")}),@AllowedValues(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\') and @name=\'type\']/@value",values={@AllowedValue(value="logo",description="Indicates the resource is an organization\'s logo."),@AllowedValue(value="image",description="Indicates the resource represents an image."),@AllowedValue(value="screen-shot",description="Indicates the resource represents an image of screen content."),@AllowedValue(value="law",description="Indicates the resource represents an applicable law."),@AllowedValue(value="regulation",description="Indicates the resource represents an applicable regulation."),@AllowedValue(value="standard",description="Indicates the resource represents an applicable standard."),@AllowedValue(value="external-guidance",description="Indicates the resource represents applicable guidance."),@AllowedValue(value="acronyms",description="Indicates the resource provides a list of relevant acronyms."),@AllowedValue(value="citation",description="Indicates the resource cites relevant information."),@AllowedValue(value="policy",description="Indicates the resource is a policy."),@AllowedValue(value="procedure",description="Indicates the resource is a procedure."),@AllowedValue(value="system-guide",description="Indicates the resource is guidance document related to the subject system of an SSP."),@AllowedValue(value="users-guide",description="Indicates the resource is guidance document a user\'s guide or administrator\'s guide."),@AllowedValue(value="administrators-guide",description="Indicates the resource is guidance document a administrator\'s guide."),@AllowedValue(value="rules-of-behavior",description="Indicates the resource represents rules of behavior content."),@AllowedValue(value="plan",description="Indicates the resource represents a plan."),@AllowedValue(value="artifact",description="Indicates the resource represents an artifact, such as may be reviewed by an assessor."),@AllowedValue(value="evidence",description="Indicates the resource represents evidence, such as to support an assessment finding."),@AllowedValue(value="tool-output",description="Indicates the resource represents output from a tool."),@AllowedValue(value="raw-data",description="Indicates the resource represents machine data, which may require a tool or analysis for interpretation or presentation."),@AllowedValue(value="interview-notes",description="Indicates the resource represents notes from an interview, such as may be collected during an assessment."),@AllowedValue(value="questionnaire",description="Indicates the resource is a set of questions, possibly with responses."),@AllowedValue(value="report",description="Indicates the resource is a report."),@AllowedValue(value="agreement",description="Indicates the resource is a formal agreement between two or more parties.")})},matches=@Matches(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\') and @name=\'published\']/@value",typeAdapter=gov.nist.secauto.metaschema.model.common.datatype.adapter.DateTimeWithTZAdapter.class),expect=@Expect(level=ERROR,target=".[citation]",test="title")) @AssemblyConstraints(isUnique={@IsUnique(id="unique-resource-rlink-href",level=ERROR,target="rlink",keyFields={@KeyField(target="@href"),@KeyField(target="@media-type")}),@IsUnique(id="unique-resource-base64-filename",level=ERROR,target="base64",keyFields=@KeyField(target="@filename"))},hasCardinality=@HasCardinality(level=WARNING,target="rlink|base64",minOccurs=1)) public static class BackMatter.Resource extends ObjectA resource associated with content in the containing document instance. A resource may be directly included in the document using base64 encoding or may point to one or more equivalent internet resources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBackMatter.Resource.Base64A resource encoded using the Base64 alphabet defined by RFC 2045.static classBackMatter.Resource.CitationAn optional citation consisting of end note text using structured markup.static classBackMatter.Resource.RlinkA URL-based pointer to an external resource with an optional hash for verification and change detection.
-
Constructor Summary
Constructors Constructor Description Resource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddDocumentId(DocumentId item)Add a newDocumentIditem to the underlying collection.booleanaddProp(Property item)Add a newPropertyitem to the underlying collection.booleanaddRlink(BackMatter.Resource.Rlink item)Add a newBackMatter.Resource.Rlinkitem to the underlying collection.BackMatter.Resource.Base64getBase64()BackMatter.Resource.CitationgetCitation()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilinegetDescription()List<DocumentId>getDocumentIds()List<Property>getProps()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilinegetRemarks()List<BackMatter.Resource.Rlink>getRlinks()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLinegetTitle()UUIDgetUuid()booleanremoveDocumentId(DocumentId item)Remove the first matchingDocumentIditem from the underlying collection.booleanremoveProp(Property item)Remove the first matchingPropertyitem from the underlying collection.booleanremoveRlink(BackMatter.Resource.Rlink item)Remove the first matchingBackMatter.Resource.Rlinkitem from the underlying collection.voidsetBase64(BackMatter.Resource.Base64 value)voidsetCitation(BackMatter.Resource.Citation value)voidsetDescription(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)voidsetDocumentIds(List<DocumentId> value)voidsetProps(List<Property> value)voidsetRemarks(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)voidsetRlinks(List<BackMatter.Resource.Rlink> value)voidsetTitle(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)voidsetUuid(UUID value)StringtoString()
-
-
-
Constructor Detail
-
Resource
public Resource()
-
-
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)
-
getDescription
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline getDescription()
-
setDescription
public void setDescription(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
-
addProp
public boolean addProp(Property item)
Add a newPropertyitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeProp
public boolean removeProp(Property item)
Remove the first matchingPropertyitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getDocumentIds
public List<DocumentId> getDocumentIds()
-
setDocumentIds
public void setDocumentIds(List<DocumentId> value)
-
addDocumentId
public boolean addDocumentId(DocumentId item)
Add a newDocumentIditem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeDocumentId
public boolean removeDocumentId(DocumentId item)
Remove the first matchingDocumentIditem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getCitation
public BackMatter.Resource.Citation getCitation()
-
setCitation
public void setCitation(BackMatter.Resource.Citation value)
-
getRlinks
public List<BackMatter.Resource.Rlink> getRlinks()
-
setRlinks
public void setRlinks(List<BackMatter.Resource.Rlink> value)
-
addRlink
public boolean addRlink(BackMatter.Resource.Rlink item)
Add a newBackMatter.Resource.Rlinkitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeRlink
public boolean removeRlink(BackMatter.Resource.Rlink item)
Remove the first matchingBackMatter.Resource.Rlinkitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getBase64
public BackMatter.Resource.Base64 getBase64()
-
setBase64
public void setBase64(BackMatter.Resource.Base64 value)
-
getRemarks
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline getRemarks()
-
setRemarks
public void setRemarks(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
-
-