001package gov.nist.secauto.oscal.lib.model; 002 003import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue; 004import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues; 005import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag; 006import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaField; 007import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaFieldValue; 008import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints; 009import gov.nist.secauto.metaschema.model.common.constraint.IConstraint; 010import gov.nist.secauto.metaschema.model.common.datatype.adapter.UriAdapter; 011import java.lang.Override; 012import java.lang.String; 013import java.net.URI; 014import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle; 015import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 016 017/** 018 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented">human-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this system identification property elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. When referencing an externally defined <code>system identification</code>, the <code>system identification</code> must be used in the context of the external / imported OSCAL instance (e.g., uri-reference). This string should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same system across revisions of the document. 019 */ 020@MetaschemaField( 021 formalName = "System Identification", 022 description = "A [human-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this system identification property elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). When referencing an externally defined `system identification`, the `system identification` must be used in the context of the external / imported OSCAL instance (e.g., uri-reference). This string should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same system across revisions of the document.", 023 name = "system-id", 024 metaschema = OscalImplementationCommonMetaschema.class, 025 isCollapsible = false 026) 027public class SystemId { 028 @MetaschemaFieldValue( 029 valueKeyName = "id" 030 ) 031 private String _value; 032 033 @BoundFlag( 034 formalName = "Identification System Type", 035 description = "Identifies the identification system from which the provided identifier was assigned.", 036 useName = "identifier-type", 037 typeAdapter = UriAdapter.class, 038 remarks = "This value must be an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that serves as a [naming system identifier](https://pages.nist.gov/OSCAL/concepts/uri-use/#use-as-a-naming-system-identifier)." 039 ) 040 @ValueConstraints( 041 allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "https://fedramp.gov", description = "\\*\\*deprecated\\*\\* The identifier was assigned by FedRAMP. This has been deprecated; use `http://fedramp.gov/ns/oscal` instead."), @AllowedValue(value = "http://fedramp.gov/ns/oscal", description = "The identifier was assigned by FedRAMP."), @AllowedValue(value = "https://ietf.org/rfc/rfc4122", description = "\\*\\*deprecated\\*\\* A Universally Unique Identifier (UUID) as defined by RFC4122. This value has been deprecated; use `http://ietf.org/rfc/rfc4122` instead."), @AllowedValue(value = "http://ietf.org/rfc/rfc4122", description = "A Universally Unique Identifier (UUID) as defined by RFC4122.")}) 042 ) 043 private URI _identifierType; 044 045 public SystemId() { 046 } 047 048 public String getValue() { 049 return _value; 050 } 051 052 public void setValue(String value) { 053 _value = value; 054 } 055 056 public URI getIdentifierType() { 057 return _identifierType; 058 } 059 060 public void setIdentifierType(URI value) { 061 _identifierType = value; 062 } 063 064 @Override 065 public String toString() { 066 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString(); 067 } 068}