1 package gov.nist.secauto.oscal.lib.model;
2
3 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue;
4 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues;
5 import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
6 import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaField;
7 import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaFieldValue;
8 import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints;
9 import gov.nist.secauto.metaschema.model.common.constraint.IConstraint;
10 import gov.nist.secauto.metaschema.model.common.datatype.adapter.UriAdapter;
11 import java.lang.Override;
12 import java.lang.String;
13 import java.net.URI;
14 import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
15 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
16
17
18
19
20 @MetaschemaField(
21 formalName = "System Identification",
22 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.",
23 name = "system-id",
24 metaschema = OscalImplementationCommonMetaschema.class,
25 isCollapsible = false
26 )
27 public class SystemId {
28 @MetaschemaFieldValue(
29 valueKeyName = "id"
30 )
31 private String _value;
32
33 @BoundFlag(
34 formalName = "Identification System Type",
35 description = "Identifies the identification system from which the provided identifier was assigned.",
36 useName = "identifier-type",
37 typeAdapter = UriAdapter.class,
38 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)."
39 )
40 @ValueConstraints(
41 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.")})
42 )
43 private URI _identifierType;
44
45 public SystemId() {
46 }
47
48 public String getValue() {
49 return _value;
50 }
51
52 public void setValue(String value) {
53 _value = value;
54 }
55
56 public URI getIdentifierType() {
57 return _identifierType;
58 }
59
60 public void setIdentifierType(URI value) {
61 _identifierType = value;
62 }
63
64 @Override
65 public String toString() {
66 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
67 }
68 }