org.hl7.fhir.DeviceComponent Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2023.12.06 at 03:09:41 PM MST
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* Java class for DeviceComponent complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DeviceComponent">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier"/>
* <element name="lastSystemChange" type="{http://hl7.org/fhir}instant"/>
* <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="parent" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="operationalStatus" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="parameterGroup" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="measurementPrinciple" type="{http://hl7.org/fhir}Measmnt-Principle" minOccurs="0"/>
* <element name="productionSpecification" type="{http://hl7.org/fhir}DeviceComponent.ProductionSpecification" maxOccurs="unbounded" minOccurs="0"/>
* <element name="languageCode" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DeviceComponent", propOrder = {
"type",
"identifier",
"lastSystemChange",
"source",
"parent",
"operationalStatus",
"parameterGroup",
"measurementPrinciple",
"productionSpecification",
"languageCode"
})
public class DeviceComponent
extends DomainResource
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected CodeableConcept type;
@XmlElement(required = true)
protected Identifier identifier;
@XmlElement(required = true)
protected Instant lastSystemChange;
protected Reference source;
protected Reference parent;
protected List operationalStatus;
protected CodeableConcept parameterGroup;
protected MeasmntPrinciple measurementPrinciple;
protected List productionSpecification;
protected CodeableConcept languageCode;
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setType(CodeableConcept value) {
this.type = value;
}
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link Identifier }
*
*/
public Identifier getIdentifier() {
return identifier;
}
/**
* Sets the value of the identifier property.
*
* @param value
* allowed object is
* {@link Identifier }
*
*/
public void setIdentifier(Identifier value) {
this.identifier = value;
}
/**
* Gets the value of the lastSystemChange property.
*
* @return
* possible object is
* {@link Instant }
*
*/
public Instant getLastSystemChange() {
return lastSystemChange;
}
/**
* Sets the value of the lastSystemChange property.
*
* @param value
* allowed object is
* {@link Instant }
*
*/
public void setLastSystemChange(Instant value) {
this.lastSystemChange = value;
}
/**
* Gets the value of the source property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSource() {
return source;
}
/**
* Sets the value of the source property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSource(Reference value) {
this.source = value;
}
/**
* Gets the value of the parent property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getParent() {
return parent;
}
/**
* Sets the value of the parent property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setParent(Reference value) {
this.parent = value;
}
/**
* Gets the value of the operationalStatus 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 Jakarta XML Binding object.
* This is why there is not a set
method for the operationalStatus property.
*
*
* For example, to add a new item, do as follows:
*
* getOperationalStatus().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getOperationalStatus() {
if (operationalStatus == null) {
operationalStatus = new ArrayList();
}
return this.operationalStatus;
}
/**
* Gets the value of the parameterGroup property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getParameterGroup() {
return parameterGroup;
}
/**
* Sets the value of the parameterGroup property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setParameterGroup(CodeableConcept value) {
this.parameterGroup = value;
}
/**
* Gets the value of the measurementPrinciple property.
*
* @return
* possible object is
* {@link MeasmntPrinciple }
*
*/
public MeasmntPrinciple getMeasurementPrinciple() {
return measurementPrinciple;
}
/**
* Sets the value of the measurementPrinciple property.
*
* @param value
* allowed object is
* {@link MeasmntPrinciple }
*
*/
public void setMeasurementPrinciple(MeasmntPrinciple value) {
this.measurementPrinciple = value;
}
/**
* Gets the value of the productionSpecification 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 Jakarta XML Binding object.
* This is why there is not a set
method for the productionSpecification property.
*
*
* For example, to add a new item, do as follows:
*
* getProductionSpecification().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DeviceComponentProductionSpecification }
*
*
*/
public List getProductionSpecification() {
if (productionSpecification == null) {
productionSpecification = new ArrayList();
}
return this.productionSpecification;
}
/**
* Gets the value of the languageCode property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getLanguageCode() {
return languageCode;
}
/**
* Sets the value of the languageCode property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setLanguageCode(CodeableConcept value) {
this.languageCode = value;
}
public DeviceComponent withType(CodeableConcept value) {
setType(value);
return this;
}
public DeviceComponent withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public DeviceComponent withLastSystemChange(Instant value) {
setLastSystemChange(value);
return this;
}
public DeviceComponent withSource(Reference value) {
setSource(value);
return this;
}
public DeviceComponent withParent(Reference value) {
setParent(value);
return this;
}
public DeviceComponent withOperationalStatus(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getOperationalStatus().add(value);
}
}
return this;
}
public DeviceComponent withOperationalStatus(Collection values) {
if (values!= null) {
getOperationalStatus().addAll(values);
}
return this;
}
public DeviceComponent withParameterGroup(CodeableConcept value) {
setParameterGroup(value);
return this;
}
public DeviceComponent withMeasurementPrinciple(MeasmntPrinciple value) {
setMeasurementPrinciple(value);
return this;
}
public DeviceComponent withProductionSpecification(DeviceComponentProductionSpecification... values) {
if (values!= null) {
for (DeviceComponentProductionSpecification value: values) {
getProductionSpecification().add(value);
}
}
return this;
}
public DeviceComponent withProductionSpecification(Collection values) {
if (values!= null) {
getProductionSpecification().addAll(values);
}
return this;
}
public DeviceComponent withLanguageCode(CodeableConcept value) {
setLanguageCode(value);
return this;
}
@Override
public DeviceComponent withText(Narrative value) {
setText(value);
return this;
}
@Override
public DeviceComponent withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public DeviceComponent withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public DeviceComponent withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public DeviceComponent withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public DeviceComponent withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public DeviceComponent withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public DeviceComponent withId(Id value) {
setId(value);
return this;
}
@Override
public DeviceComponent withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public DeviceComponent withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public DeviceComponent withLanguage(Code value) {
setLanguage(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final DeviceComponent that = ((DeviceComponent) object);
{
CodeableConcept lhsType;
lhsType = this.getType();
CodeableConcept rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
{
Identifier lhsIdentifier;
lhsIdentifier = this.getIdentifier();
Identifier rhsIdentifier;
rhsIdentifier = that.getIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, (this.identifier!= null), (that.identifier!= null))) {
return false;
}
}
{
Instant lhsLastSystemChange;
lhsLastSystemChange = this.getLastSystemChange();
Instant rhsLastSystemChange;
rhsLastSystemChange = that.getLastSystemChange();
if (!strategy.equals(LocatorUtils.property(thisLocator, "lastSystemChange", lhsLastSystemChange), LocatorUtils.property(thatLocator, "lastSystemChange", rhsLastSystemChange), lhsLastSystemChange, rhsLastSystemChange, (this.lastSystemChange!= null), (that.lastSystemChange!= null))) {
return false;
}
}
{
Reference lhsSource;
lhsSource = this.getSource();
Reference rhsSource;
rhsSource = that.getSource();
if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, (this.source!= null), (that.source!= null))) {
return false;
}
}
{
Reference lhsParent;
lhsParent = this.getParent();
Reference rhsParent;
rhsParent = that.getParent();
if (!strategy.equals(LocatorUtils.property(thisLocator, "parent", lhsParent), LocatorUtils.property(thatLocator, "parent", rhsParent), lhsParent, rhsParent, (this.parent!= null), (that.parent!= null))) {
return false;
}
}
{
List lhsOperationalStatus;
lhsOperationalStatus = (((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty()))?this.getOperationalStatus():null);
List rhsOperationalStatus;
rhsOperationalStatus = (((that.operationalStatus!= null)&&(!that.operationalStatus.isEmpty()))?that.getOperationalStatus():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "operationalStatus", lhsOperationalStatus), LocatorUtils.property(thatLocator, "operationalStatus", rhsOperationalStatus), lhsOperationalStatus, rhsOperationalStatus, ((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty())), ((that.operationalStatus!= null)&&(!that.operationalStatus.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsParameterGroup;
lhsParameterGroup = this.getParameterGroup();
CodeableConcept rhsParameterGroup;
rhsParameterGroup = that.getParameterGroup();
if (!strategy.equals(LocatorUtils.property(thisLocator, "parameterGroup", lhsParameterGroup), LocatorUtils.property(thatLocator, "parameterGroup", rhsParameterGroup), lhsParameterGroup, rhsParameterGroup, (this.parameterGroup!= null), (that.parameterGroup!= null))) {
return false;
}
}
{
MeasmntPrinciple lhsMeasurementPrinciple;
lhsMeasurementPrinciple = this.getMeasurementPrinciple();
MeasmntPrinciple rhsMeasurementPrinciple;
rhsMeasurementPrinciple = that.getMeasurementPrinciple();
if (!strategy.equals(LocatorUtils.property(thisLocator, "measurementPrinciple", lhsMeasurementPrinciple), LocatorUtils.property(thatLocator, "measurementPrinciple", rhsMeasurementPrinciple), lhsMeasurementPrinciple, rhsMeasurementPrinciple, (this.measurementPrinciple!= null), (that.measurementPrinciple!= null))) {
return false;
}
}
{
List lhsProductionSpecification;
lhsProductionSpecification = (((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty()))?this.getProductionSpecification():null);
List rhsProductionSpecification;
rhsProductionSpecification = (((that.productionSpecification!= null)&&(!that.productionSpecification.isEmpty()))?that.getProductionSpecification():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "productionSpecification", lhsProductionSpecification), LocatorUtils.property(thatLocator, "productionSpecification", rhsProductionSpecification), lhsProductionSpecification, rhsProductionSpecification, ((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty())), ((that.productionSpecification!= null)&&(!that.productionSpecification.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsLanguageCode;
lhsLanguageCode = this.getLanguageCode();
CodeableConcept rhsLanguageCode;
rhsLanguageCode = that.getLanguageCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "languageCode", lhsLanguageCode), LocatorUtils.property(thatLocator, "languageCode", rhsLanguageCode), lhsLanguageCode, rhsLanguageCode, (this.languageCode!= null), (that.languageCode!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
CodeableConcept theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, (this.identifier!= null));
}
{
Instant theLastSystemChange;
theLastSystemChange = this.getLastSystemChange();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastSystemChange", theLastSystemChange), currentHashCode, theLastSystemChange, (this.lastSystemChange!= null));
}
{
Reference theSource;
theSource = this.getSource();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null));
}
{
Reference theParent;
theParent = this.getParent();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parent", theParent), currentHashCode, theParent, (this.parent!= null));
}
{
List theOperationalStatus;
theOperationalStatus = (((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty()))?this.getOperationalStatus():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "operationalStatus", theOperationalStatus), currentHashCode, theOperationalStatus, ((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty())));
}
{
CodeableConcept theParameterGroup;
theParameterGroup = this.getParameterGroup();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parameterGroup", theParameterGroup), currentHashCode, theParameterGroup, (this.parameterGroup!= null));
}
{
MeasmntPrinciple theMeasurementPrinciple;
theMeasurementPrinciple = this.getMeasurementPrinciple();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "measurementPrinciple", theMeasurementPrinciple), currentHashCode, theMeasurementPrinciple, (this.measurementPrinciple!= null));
}
{
List theProductionSpecification;
theProductionSpecification = (((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty()))?this.getProductionSpecification():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "productionSpecification", theProductionSpecification), currentHashCode, theProductionSpecification, ((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty())));
}
{
CodeableConcept theLanguageCode;
theLanguageCode = this.getLanguageCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "languageCode", theLanguageCode), currentHashCode, theLanguageCode, (this.languageCode!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 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, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
CodeableConcept theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, (this.identifier!= null));
}
{
Instant theLastSystemChange;
theLastSystemChange = this.getLastSystemChange();
strategy.appendField(locator, this, "lastSystemChange", buffer, theLastSystemChange, (this.lastSystemChange!= null));
}
{
Reference theSource;
theSource = this.getSource();
strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null));
}
{
Reference theParent;
theParent = this.getParent();
strategy.appendField(locator, this, "parent", buffer, theParent, (this.parent!= null));
}
{
List theOperationalStatus;
theOperationalStatus = (((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty()))?this.getOperationalStatus():null);
strategy.appendField(locator, this, "operationalStatus", buffer, theOperationalStatus, ((this.operationalStatus!= null)&&(!this.operationalStatus.isEmpty())));
}
{
CodeableConcept theParameterGroup;
theParameterGroup = this.getParameterGroup();
strategy.appendField(locator, this, "parameterGroup", buffer, theParameterGroup, (this.parameterGroup!= null));
}
{
MeasmntPrinciple theMeasurementPrinciple;
theMeasurementPrinciple = this.getMeasurementPrinciple();
strategy.appendField(locator, this, "measurementPrinciple", buffer, theMeasurementPrinciple, (this.measurementPrinciple!= null));
}
{
List theProductionSpecification;
theProductionSpecification = (((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty()))?this.getProductionSpecification():null);
strategy.appendField(locator, this, "productionSpecification", buffer, theProductionSpecification, ((this.productionSpecification!= null)&&(!this.productionSpecification.isEmpty())));
}
{
CodeableConcept theLanguageCode;
theLanguageCode = this.getLanguageCode();
strategy.appendField(locator, this, "languageCode", buffer, theLanguageCode, (this.languageCode!= null));
}
return buffer;
}
}