org.somda.sdc.biceps.model.participant.CodedValue Maven / Gradle / Ivy
Show all versions of biceps-model Show documentation
package org.somda.sdc.biceps.model.participant;
import java.util.ArrayList;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import org.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
import org.somda.sdc.biceps.model.extension.ExtensionType;
/**
* In general, in an interoperability format, objects, attributes, and methods are identified by nomenclature codes. CodedValue offers the ability to represent such nomenclature codes.
*
* Two CodedValue objects C1 and C2 are equivalent, if
*
* - C1/@Code equals C2/@Code
* - C1/@CodingSystem equals C2/@CodingSystem, both with expanded default values
* - C1/@CodingSystemVersion equals C2/@CodingSystemVersion
* - If there exists a CodedValue object T1 in C1/pm:Translation and a CodedValue object T2 in C2/pm:Translation such that T1 and T2 are equivalent, C1 and T2 are equivalent, or C2 and T1 are equivalent.
*
* NOTE 1—In case that ./@CodingSystem is not explicitly defined in CodedValue, it is replaced implicitly by a default identifier. The ./@CodingSystem ATTRIBUTE is then called "expanded".
* NOTE 2—As prescribed in ./@CodingSystemVersion, a version is set only if a unique version identification by ./@CodingSystem is not possible. Hence, there can be no implicit version mismatch.
* NOTE 3—Equivalence between CodedValue objects is not necessarily transitive.
*
* Java class for CodedValue complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CodedValue", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = {
"extension",
"codingSystemName",
"conceptDescription",
"translation"
})
public class CodedValue implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension")
protected ExtensionType extension;
/**
* Human-readable name of the CODING SYSTEM that is described by pm:CodedValue/@CodingSystem.
*
*/
@XmlElement(name = "CodingSystemName", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List codingSystemName;
/**
* Multiple OPTIONAL human-readable texts that describe the CODE in more detail.
*
*/
@XmlElement(name = "ConceptDescription", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List conceptDescription;
/**
* Set of alternative or equivalent representations.
*
*/
@XmlElement(name = "Translation", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List translation;
/**
* REQUIRED unique identifier of the CODE in the CODING SYSTEM.
*
* Example: as "20720" from Block 2, of IEEE 11073-10101:2004, is the id for "MDC_PRESS_AWAY", the context-free CODE (CF_Code10) is "151792" which represents the unique identifier used within IEEE 11073-10101:2004.
*
*/
@XmlAttribute(name = "Code", required = true)
protected String code;
/**
* Unique identifier of a CODING SYSTEM that pm:CodedValue/@Code originating from.
*
* If no CODING SYSTEM is defined, the implied value SHALL be "urn:oid:1.2.840.10004.1.1.1.0.0.1", which refers to ISO/IEC 11073-10101.
*
* Example: "urn:oid:1.2.840.10004.1.1.1.0.0.1" for the ISO/IEC 11073-10101.
*
*/
@XmlAttribute(name = "CodingSystem")
@XmlSchemaType(name = "anyURI")
protected String codingSystem;
/**
* CodingSystemVersion is a particular version of the CODING SYSTEM defined by pm:CodedValue/@CodingSystem. CodingSystemVersion SHALL be set if multiple versions of the underlying CODING SYSTEM exist and a unique identification of the CODED VALUE is not possible by other means.
*
* Example: "20041215" for the ISO/IEC 11073-10101:2004, as it is the release date of the standard's first edition.
*
*/
@XmlAttribute(name = "CodingSystemVersion")
protected String codingSystemVersion;
/**
* See pm:SymbolicCodeName.
*
*/
@XmlAttribute(name = "SymbolicCodeName")
protected String symbolicCodeName;
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link ExtensionType }
*
*/
@Nullable
public ExtensionType getExtension() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link ExtensionType }
*
*/
public void setExtension(
@Nullable
ExtensionType value) {
this.extension = value;
}
/**
* Human-readable name of the CODING SYSTEM that is described by pm:CodedValue/@CodingSystem.
*
* Gets the value of the codingSystemName property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the codingSystemName property.
*
*
* For example, to add a new item, do as follows:
*
*
* getCodingSystemName().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link LocalizedText }
*
*
*
* @return
* The value of the codingSystemName property.
*/
public List getCodingSystemName() {
if (codingSystemName == null) {
codingSystemName = new ArrayList<>();
}
return this.codingSystemName;
}
/**
* Multiple OPTIONAL human-readable texts that describe the CODE in more detail.
*
* Gets the value of the conceptDescription property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the conceptDescription property.
*
*
* For example, to add a new item, do as follows:
*
*
* getConceptDescription().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link LocalizedText }
*
*
*
* @return
* The value of the conceptDescription property.
*/
public List getConceptDescription() {
if (conceptDescription == null) {
conceptDescription = new ArrayList<>();
}
return this.conceptDescription;
}
/**
* Set of alternative or equivalent representations.
*
* Gets the value of the translation property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the translation property.
*
*
* For example, to add a new item, do as follows:
*
*
* getTranslation().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodedValue.Translation }
*
*
*
* @return
* The value of the translation property.
*/
public List getTranslation() {
if (translation == null) {
translation = new ArrayList<>();
}
return this.translation;
}
/**
* REQUIRED unique identifier of the CODE in the CODING SYSTEM.
*
* Example: as "20720" from Block 2, of IEEE 11073-10101:2004, is the id for "MDC_PRESS_AWAY", the context-free CODE (CF_Code10) is "151792" which represents the unique identifier used within IEEE 11073-10101:2004.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCode()
*/
public void setCode(String value) {
this.code = value;
}
/**
* Unique identifier of a CODING SYSTEM that pm:CodedValue/@Code originating from.
*
* If no CODING SYSTEM is defined, the implied value SHALL be "urn:oid:1.2.840.10004.1.1.1.0.0.1", which refers to ISO/IEC 11073-10101.
*
* Example: "urn:oid:1.2.840.10004.1.1.1.0.0.1" for the ISO/IEC 11073-10101.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getCodingSystem() {
return codingSystem;
}
/**
* Sets the value of the codingSystem property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCodingSystem()
*/
public void setCodingSystem(
@Nullable
String value) {
this.codingSystem = value;
}
/**
* CodingSystemVersion is a particular version of the CODING SYSTEM defined by pm:CodedValue/@CodingSystem. CodingSystemVersion SHALL be set if multiple versions of the underlying CODING SYSTEM exist and a unique identification of the CODED VALUE is not possible by other means.
*
* Example: "20041215" for the ISO/IEC 11073-10101:2004, as it is the release date of the standard's first edition.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getCodingSystemVersion() {
return codingSystemVersion;
}
/**
* Sets the value of the codingSystemVersion property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCodingSystemVersion()
*/
public void setCodingSystemVersion(
@Nullable
String value) {
this.codingSystemVersion = value;
}
/**
* See pm:SymbolicCodeName.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getSymbolicCodeName() {
return symbolicCodeName;
}
/**
* Sets the value of the symbolicCodeName property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getSymbolicCodeName()
*/
public void setSymbolicCodeName(
@Nullable
String value) {
this.symbolicCodeName = value;
}
public void setCodingSystemName(
@Nullable
List value) {
this.codingSystemName = null;
if (value!= null) {
List draftl = this.getCodingSystemName();
draftl.addAll(value);
}
}
public void setConceptDescription(
@Nullable
List value) {
this.conceptDescription = null;
if (value!= null) {
List draftl = this.getConceptDescription();
draftl.addAll(value);
}
}
public void setTranslation(
@Nullable
List value) {
this.translation = null;
if (value!= null) {
List draftl = this.getTranslation();
draftl.addAll(value);
}
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final CodedValue that = ((CodedValue) object);
{
ExtensionType leftExtension;
leftExtension = this.getExtension();
ExtensionType rightExtension;
rightExtension = that.getExtension();
if (this.extension!= null) {
if (that.extension!= null) {
if (!leftExtension.equals(rightExtension)) {
return false;
}
} else {
return false;
}
} else {
if (that.extension!= null) {
return false;
}
}
}
{
List leftCodingSystemName;
leftCodingSystemName = (((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty()))?this.getCodingSystemName():null);
List rightCodingSystemName;
rightCodingSystemName = (((that.codingSystemName!= null)&&(!that.codingSystemName.isEmpty()))?that.getCodingSystemName():null);
if ((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty())) {
if ((that.codingSystemName!= null)&&(!that.codingSystemName.isEmpty())) {
if (!leftCodingSystemName.equals(rightCodingSystemName)) {
return false;
}
} else {
return false;
}
} else {
if ((that.codingSystemName!= null)&&(!that.codingSystemName.isEmpty())) {
return false;
}
}
}
{
List leftConceptDescription;
leftConceptDescription = (((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty()))?this.getConceptDescription():null);
List rightConceptDescription;
rightConceptDescription = (((that.conceptDescription!= null)&&(!that.conceptDescription.isEmpty()))?that.getConceptDescription():null);
if ((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty())) {
if ((that.conceptDescription!= null)&&(!that.conceptDescription.isEmpty())) {
if (!leftConceptDescription.equals(rightConceptDescription)) {
return false;
}
} else {
return false;
}
} else {
if ((that.conceptDescription!= null)&&(!that.conceptDescription.isEmpty())) {
return false;
}
}
}
{
List leftTranslation;
leftTranslation = (((this.translation!= null)&&(!this.translation.isEmpty()))?this.getTranslation():null);
List rightTranslation;
rightTranslation = (((that.translation!= null)&&(!that.translation.isEmpty()))?that.getTranslation():null);
if ((this.translation!= null)&&(!this.translation.isEmpty())) {
if ((that.translation!= null)&&(!that.translation.isEmpty())) {
if (!leftTranslation.equals(rightTranslation)) {
return false;
}
} else {
return false;
}
} else {
if ((that.translation!= null)&&(!that.translation.isEmpty())) {
return false;
}
}
}
{
String leftCode;
leftCode = this.getCode();
String rightCode;
rightCode = that.getCode();
if (this.code!= null) {
if (that.code!= null) {
if (!leftCode.equals(rightCode)) {
return false;
}
} else {
return false;
}
} else {
if (that.code!= null) {
return false;
}
}
}
{
String leftCodingSystem;
leftCodingSystem = this.getCodingSystem();
String rightCodingSystem;
rightCodingSystem = that.getCodingSystem();
if (this.codingSystem!= null) {
if (that.codingSystem!= null) {
if (!leftCodingSystem.equals(rightCodingSystem)) {
return false;
}
} else {
return false;
}
} else {
if (that.codingSystem!= null) {
return false;
}
}
}
{
String leftCodingSystemVersion;
leftCodingSystemVersion = this.getCodingSystemVersion();
String rightCodingSystemVersion;
rightCodingSystemVersion = that.getCodingSystemVersion();
if (this.codingSystemVersion!= null) {
if (that.codingSystemVersion!= null) {
if (!leftCodingSystemVersion.equals(rightCodingSystemVersion)) {
return false;
}
} else {
return false;
}
} else {
if (that.codingSystemVersion!= null) {
return false;
}
}
}
{
String leftSymbolicCodeName;
leftSymbolicCodeName = this.getSymbolicCodeName();
String rightSymbolicCodeName;
rightSymbolicCodeName = that.getSymbolicCodeName();
if (this.symbolicCodeName!= null) {
if (that.symbolicCodeName!= null) {
if (!leftSymbolicCodeName.equals(rightSymbolicCodeName)) {
return false;
}
} else {
return false;
}
} else {
if (that.symbolicCodeName!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
ExtensionType theExtension;
theExtension = this.getExtension();
if (this.extension!= null) {
currentHashCode += theExtension.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theCodingSystemName;
theCodingSystemName = (((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty()))?this.getCodingSystemName():null);
if ((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty())) {
currentHashCode += theCodingSystemName.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theConceptDescription;
theConceptDescription = (((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty()))?this.getConceptDescription():null);
if ((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty())) {
currentHashCode += theConceptDescription.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theTranslation;
theTranslation = (((this.translation!= null)&&(!this.translation.isEmpty()))?this.getTranslation():null);
if ((this.translation!= null)&&(!this.translation.isEmpty())) {
currentHashCode += theTranslation.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCode;
theCode = this.getCode();
if (this.code!= null) {
currentHashCode += theCode.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCodingSystem;
theCodingSystem = this.getCodingSystem();
if (this.codingSystem!= null) {
currentHashCode += theCodingSystem.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCodingSystemVersion;
theCodingSystemVersion = this.getCodingSystemVersion();
if (this.codingSystemVersion!= null) {
currentHashCode += theCodingSystemVersion.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theSymbolicCodeName;
theSymbolicCodeName = this.getSymbolicCodeName();
if (this.symbolicCodeName!= null) {
currentHashCode += theSymbolicCodeName.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
ExtensionType theExtension;
theExtension = this.getExtension();
strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null));
}
{
List theCodingSystemName;
theCodingSystemName = (((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty()))?this.getCodingSystemName():null);
strategy.appendField(locator, this, "codingSystemName", buffer, theCodingSystemName, ((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty())));
}
{
List theConceptDescription;
theConceptDescription = (((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty()))?this.getConceptDescription():null);
strategy.appendField(locator, this, "conceptDescription", buffer, theConceptDescription, ((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty())));
}
{
List theTranslation;
theTranslation = (((this.translation!= null)&&(!this.translation.isEmpty()))?this.getTranslation():null);
strategy.appendField(locator, this, "translation", buffer, theTranslation, ((this.translation!= null)&&(!this.translation.isEmpty())));
}
{
String theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null));
}
{
String theCodingSystem;
theCodingSystem = this.getCodingSystem();
strategy.appendField(locator, this, "codingSystem", buffer, theCodingSystem, (this.codingSystem!= null));
}
{
String theCodingSystemVersion;
theCodingSystemVersion = this.getCodingSystemVersion();
strategy.appendField(locator, this, "codingSystemVersion", buffer, theCodingSystemVersion, (this.codingSystemVersion!= null));
}
{
String theSymbolicCodeName;
theSymbolicCodeName = this.getSymbolicCodeName();
strategy.appendField(locator, this, "symbolicCodeName", buffer, theSymbolicCodeName, (this.symbolicCodeName!= null));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof CodedValue) {
final CodedValue copy = ((CodedValue) draftCopy);
{
Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null));
if (extensionShouldBeCopiedAndSet == Boolean.TRUE) {
ExtensionType sourceExtension;
sourceExtension = this.getExtension();
ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null)));
copy.setExtension(copyExtension);
} else {
if (extensionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.extension = null;
}
}
}
{
Boolean codingSystemNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty())));
if (codingSystemNameShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceCodingSystemName;
sourceCodingSystemName = (((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty()))?this.getCodingSystemName():null);
@SuppressWarnings("unchecked")
List copyCodingSystemName = ((List ) strategy.copy(LocatorUtils.property(locator, "codingSystemName", sourceCodingSystemName), sourceCodingSystemName, ((this.codingSystemName!= null)&&(!this.codingSystemName.isEmpty()))));
copy.setCodingSystemName(copyCodingSystemName);
} else {
if (codingSystemNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.codingSystemName = null;
}
}
}
{
Boolean conceptDescriptionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty())));
if (conceptDescriptionShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceConceptDescription;
sourceConceptDescription = (((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty()))?this.getConceptDescription():null);
@SuppressWarnings("unchecked")
List copyConceptDescription = ((List ) strategy.copy(LocatorUtils.property(locator, "conceptDescription", sourceConceptDescription), sourceConceptDescription, ((this.conceptDescription!= null)&&(!this.conceptDescription.isEmpty()))));
copy.setConceptDescription(copyConceptDescription);
} else {
if (conceptDescriptionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.conceptDescription = null;
}
}
}
{
Boolean translationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.translation!= null)&&(!this.translation.isEmpty())));
if (translationShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceTranslation;
sourceTranslation = (((this.translation!= null)&&(!this.translation.isEmpty()))?this.getTranslation():null);
@SuppressWarnings("unchecked")
List copyTranslation = ((List ) strategy.copy(LocatorUtils.property(locator, "translation", sourceTranslation), sourceTranslation, ((this.translation!= null)&&(!this.translation.isEmpty()))));
copy.setTranslation(copyTranslation);
} else {
if (translationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.translation = null;
}
}
}
{
Boolean codeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.code!= null));
if (codeShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCode;
sourceCode = this.getCode();
String copyCode = ((String) strategy.copy(LocatorUtils.property(locator, "code", sourceCode), sourceCode, (this.code!= null)));
copy.setCode(copyCode);
} else {
if (codeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.code = null;
}
}
}
{
Boolean codingSystemShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.codingSystem!= null));
if (codingSystemShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCodingSystem;
sourceCodingSystem = this.getCodingSystem();
String copyCodingSystem = ((String) strategy.copy(LocatorUtils.property(locator, "codingSystem", sourceCodingSystem), sourceCodingSystem, (this.codingSystem!= null)));
copy.setCodingSystem(copyCodingSystem);
} else {
if (codingSystemShouldBeCopiedAndSet == Boolean.FALSE) {
copy.codingSystem = null;
}
}
}
{
Boolean codingSystemVersionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.codingSystemVersion!= null));
if (codingSystemVersionShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCodingSystemVersion;
sourceCodingSystemVersion = this.getCodingSystemVersion();
String copyCodingSystemVersion = ((String) strategy.copy(LocatorUtils.property(locator, "codingSystemVersion", sourceCodingSystemVersion), sourceCodingSystemVersion, (this.codingSystemVersion!= null)));
copy.setCodingSystemVersion(copyCodingSystemVersion);
} else {
if (codingSystemVersionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.codingSystemVersion = null;
}
}
}
{
Boolean symbolicCodeNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.symbolicCodeName!= null));
if (symbolicCodeNameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSymbolicCodeName;
sourceSymbolicCodeName = this.getSymbolicCodeName();
String copySymbolicCodeName = ((String) strategy.copy(LocatorUtils.property(locator, "symbolicCodeName", sourceSymbolicCodeName), sourceSymbolicCodeName, (this.symbolicCodeName!= null)));
copy.setSymbolicCodeName(copySymbolicCodeName);
} else {
if (symbolicCodeNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.symbolicCodeName = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new CodedValue();
}
/**
* Java class for anonymous complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extension"
})
public static class Translation implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension")
protected ExtensionType extension;
/**
* A code as defined by pm:CodedValue/@Code.
*
*/
@XmlAttribute(name = "Code", required = true)
protected String code;
/**
* A coding system as defined by pm:CodedValue/@CodingSystem.
*
*/
@XmlAttribute(name = "CodingSystem")
@XmlSchemaType(name = "anyURI")
protected String codingSystem;
/**
* A coding system version as defined by pm:CodedValue/@CodingSystemVersion.
*
*/
@XmlAttribute(name = "CodingSystemVersion")
protected String codingSystemVersion;
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link ExtensionType }
*
*/
@Nullable
public ExtensionType getExtension() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link ExtensionType }
*
*/
public void setExtension(
@Nullable
ExtensionType value) {
this.extension = value;
}
/**
* A code as defined by pm:CodedValue/@Code.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCode()
*/
public void setCode(String value) {
this.code = value;
}
/**
* A coding system as defined by pm:CodedValue/@CodingSystem.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getCodingSystem() {
return codingSystem;
}
/**
* Sets the value of the codingSystem property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCodingSystem()
*/
public void setCodingSystem(
@Nullable
String value) {
this.codingSystem = value;
}
/**
* A coding system version as defined by pm:CodedValue/@CodingSystemVersion.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getCodingSystemVersion() {
return codingSystemVersion;
}
/**
* Sets the value of the codingSystemVersion property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getCodingSystemVersion()
*/
public void setCodingSystemVersion(
@Nullable
String value) {
this.codingSystemVersion = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final CodedValue.Translation that = ((CodedValue.Translation) object);
{
ExtensionType leftExtension;
leftExtension = this.getExtension();
ExtensionType rightExtension;
rightExtension = that.getExtension();
if (this.extension!= null) {
if (that.extension!= null) {
if (!leftExtension.equals(rightExtension)) {
return false;
}
} else {
return false;
}
} else {
if (that.extension!= null) {
return false;
}
}
}
{
String leftCode;
leftCode = this.getCode();
String rightCode;
rightCode = that.getCode();
if (this.code!= null) {
if (that.code!= null) {
if (!leftCode.equals(rightCode)) {
return false;
}
} else {
return false;
}
} else {
if (that.code!= null) {
return false;
}
}
}
{
String leftCodingSystem;
leftCodingSystem = this.getCodingSystem();
String rightCodingSystem;
rightCodingSystem = that.getCodingSystem();
if (this.codingSystem!= null) {
if (that.codingSystem!= null) {
if (!leftCodingSystem.equals(rightCodingSystem)) {
return false;
}
} else {
return false;
}
} else {
if (that.codingSystem!= null) {
return false;
}
}
}
{
String leftCodingSystemVersion;
leftCodingSystemVersion = this.getCodingSystemVersion();
String rightCodingSystemVersion;
rightCodingSystemVersion = that.getCodingSystemVersion();
if (this.codingSystemVersion!= null) {
if (that.codingSystemVersion!= null) {
if (!leftCodingSystemVersion.equals(rightCodingSystemVersion)) {
return false;
}
} else {
return false;
}
} else {
if (that.codingSystemVersion!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
ExtensionType theExtension;
theExtension = this.getExtension();
if (this.extension!= null) {
currentHashCode += theExtension.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCode;
theCode = this.getCode();
if (this.code!= null) {
currentHashCode += theCode.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCodingSystem;
theCodingSystem = this.getCodingSystem();
if (this.codingSystem!= null) {
currentHashCode += theCodingSystem.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theCodingSystemVersion;
theCodingSystemVersion = this.getCodingSystemVersion();
if (this.codingSystemVersion!= null) {
currentHashCode += theCodingSystemVersion.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
ExtensionType theExtension;
theExtension = this.getExtension();
strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null));
}
{
String theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null));
}
{
String theCodingSystem;
theCodingSystem = this.getCodingSystem();
strategy.appendField(locator, this, "codingSystem", buffer, theCodingSystem, (this.codingSystem!= null));
}
{
String theCodingSystemVersion;
theCodingSystemVersion = this.getCodingSystemVersion();
strategy.appendField(locator, this, "codingSystemVersion", buffer, theCodingSystemVersion, (this.codingSystemVersion!= null));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof CodedValue.Translation) {
final CodedValue.Translation copy = ((CodedValue.Translation) draftCopy);
{
Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null));
if (extensionShouldBeCopiedAndSet == Boolean.TRUE) {
ExtensionType sourceExtension;
sourceExtension = this.getExtension();
ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null)));
copy.setExtension(copyExtension);
} else {
if (extensionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.extension = null;
}
}
}
{
Boolean codeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.code!= null));
if (codeShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCode;
sourceCode = this.getCode();
String copyCode = ((String) strategy.copy(LocatorUtils.property(locator, "code", sourceCode), sourceCode, (this.code!= null)));
copy.setCode(copyCode);
} else {
if (codeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.code = null;
}
}
}
{
Boolean codingSystemShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.codingSystem!= null));
if (codingSystemShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCodingSystem;
sourceCodingSystem = this.getCodingSystem();
String copyCodingSystem = ((String) strategy.copy(LocatorUtils.property(locator, "codingSystem", sourceCodingSystem), sourceCodingSystem, (this.codingSystem!= null)));
copy.setCodingSystem(copyCodingSystem);
} else {
if (codingSystemShouldBeCopiedAndSet == Boolean.FALSE) {
copy.codingSystem = null;
}
}
}
{
Boolean codingSystemVersionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.codingSystemVersion!= null));
if (codingSystemVersionShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCodingSystemVersion;
sourceCodingSystemVersion = this.getCodingSystemVersion();
String copyCodingSystemVersion = ((String) strategy.copy(LocatorUtils.property(locator, "codingSystemVersion", sourceCodingSystemVersion), sourceCodingSystemVersion, (this.codingSystemVersion!= null)));
copy.setCodingSystemVersion(copyCodingSystemVersion);
} else {
if (codingSystemVersionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.codingSystemVersion = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new CodedValue.Translation();
}
}
}