SystemId.java
package gov.nist.secauto.oscal.lib.model;
import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter;
import gov.nist.secauto.metaschema.core.model.IBoundObject;
import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
import gov.nist.secauto.metaschema.core.model.constraint.IConstraint;
import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue;
import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues;
import gov.nist.secauto.metaschema.databind.model.annotations.BoundFieldValue;
import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField;
import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints;
import java.lang.Override;
import java.lang.String;
import java.net.URI;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 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.
*/
@MetaschemaField(
formalName = "System Identification",
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.",
name = "system-id",
moduleClass = OscalImplementationCommonModule.class
)
public class SystemId implements IBoundObject {
private final IMetaschemaData __metaschemaData;
/**
* "Identifies the identification system from which the provided identifier was assigned."
*/
@BoundFlag(
formalName = "Identification System Type",
description = "Identifies the identification system from which the provided identifier was assigned.",
name = "identifier-type",
typeAdapter = UriAdapter.class,
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).",
valueConstraints = @ValueConstraints(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.")}))
)
private URI _identifierType;
@BoundFieldValue(
valueKeyName = "id"
)
private String _id;
public SystemId() {
this(null);
}
public SystemId(IMetaschemaData data) {
this.__metaschemaData = data;
}
@Override
public IMetaschemaData getMetaschemaData() {
return __metaschemaData;
}
public URI getIdentifierType() {
return _identifierType;
}
public void setIdentifierType(URI value) {
_identifierType = value;
}
public String getId() {
return _id;
}
public void setId(String value) {
_id = value;
}
@Override
public String toString() {
return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
}
}