org.hl7.fhir.DeviceMetric 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: 2024.09.27 at 11:16:19 AM MDT
//
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 DeviceMetric complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DeviceMetric">
* <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="unit" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <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}DeviceMetricOperationalStatus" minOccurs="0"/>
* <element name="color" type="{http://hl7.org/fhir}DeviceMetricColor" minOccurs="0"/>
* <element name="category" type="{http://hl7.org/fhir}DeviceMetricCategory"/>
* <element name="measurementPeriod" type="{http://hl7.org/fhir}Timing" minOccurs="0"/>
* <element name="calibration" type="{http://hl7.org/fhir}DeviceMetric.Calibration" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DeviceMetric", propOrder = {
"type",
"identifier",
"unit",
"source",
"parent",
"operationalStatus",
"color",
"category",
"measurementPeriod",
"calibration"
})
public class DeviceMetric
extends DomainResource
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected CodeableConcept type;
@XmlElement(required = true)
protected Identifier identifier;
protected CodeableConcept unit;
protected Reference source;
protected Reference parent;
protected DeviceMetricOperationalStatus operationalStatus;
protected DeviceMetricColor color;
@XmlElement(required = true)
protected DeviceMetricCategory category;
protected Timing measurementPeriod;
protected List calibration;
/**
* 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 unit property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getUnit() {
return unit;
}
/**
* Sets the value of the unit property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setUnit(CodeableConcept value) {
this.unit = 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.
*
* @return
* possible object is
* {@link DeviceMetricOperationalStatus }
*
*/
public DeviceMetricOperationalStatus getOperationalStatus() {
return operationalStatus;
}
/**
* Sets the value of the operationalStatus property.
*
* @param value
* allowed object is
* {@link DeviceMetricOperationalStatus }
*
*/
public void setOperationalStatus(DeviceMetricOperationalStatus value) {
this.operationalStatus = value;
}
/**
* Gets the value of the color property.
*
* @return
* possible object is
* {@link DeviceMetricColor }
*
*/
public DeviceMetricColor getColor() {
return color;
}
/**
* Sets the value of the color property.
*
* @param value
* allowed object is
* {@link DeviceMetricColor }
*
*/
public void setColor(DeviceMetricColor value) {
this.color = value;
}
/**
* Gets the value of the category property.
*
* @return
* possible object is
* {@link DeviceMetricCategory }
*
*/
public DeviceMetricCategory getCategory() {
return category;
}
/**
* Sets the value of the category property.
*
* @param value
* allowed object is
* {@link DeviceMetricCategory }
*
*/
public void setCategory(DeviceMetricCategory value) {
this.category = value;
}
/**
* Gets the value of the measurementPeriod property.
*
* @return
* possible object is
* {@link Timing }
*
*/
public Timing getMeasurementPeriod() {
return measurementPeriod;
}
/**
* Sets the value of the measurementPeriod property.
*
* @param value
* allowed object is
* {@link Timing }
*
*/
public void setMeasurementPeriod(Timing value) {
this.measurementPeriod = value;
}
/**
* Gets the value of the calibration 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 calibration property.
*
*
* For example, to add a new item, do as follows:
*
* getCalibration().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DeviceMetricCalibration }
*
*
*/
public List getCalibration() {
if (calibration == null) {
calibration = new ArrayList();
}
return this.calibration;
}
public DeviceMetric withType(CodeableConcept value) {
setType(value);
return this;
}
public DeviceMetric withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public DeviceMetric withUnit(CodeableConcept value) {
setUnit(value);
return this;
}
public DeviceMetric withSource(Reference value) {
setSource(value);
return this;
}
public DeviceMetric withParent(Reference value) {
setParent(value);
return this;
}
public DeviceMetric withOperationalStatus(DeviceMetricOperationalStatus value) {
setOperationalStatus(value);
return this;
}
public DeviceMetric withColor(DeviceMetricColor value) {
setColor(value);
return this;
}
public DeviceMetric withCategory(DeviceMetricCategory value) {
setCategory(value);
return this;
}
public DeviceMetric withMeasurementPeriod(Timing value) {
setMeasurementPeriod(value);
return this;
}
public DeviceMetric withCalibration(DeviceMetricCalibration... values) {
if (values!= null) {
for (DeviceMetricCalibration value: values) {
getCalibration().add(value);
}
}
return this;
}
public DeviceMetric withCalibration(Collection values) {
if (values!= null) {
getCalibration().addAll(values);
}
return this;
}
@Override
public DeviceMetric withText(Narrative value) {
setText(value);
return this;
}
@Override
public DeviceMetric withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public DeviceMetric withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public DeviceMetric withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public DeviceMetric withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public DeviceMetric withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public DeviceMetric withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public DeviceMetric withId(Id value) {
setId(value);
return this;
}
@Override
public DeviceMetric withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public DeviceMetric withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public DeviceMetric 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 DeviceMetric that = ((DeviceMetric) 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;
}
}
{
CodeableConcept lhsUnit;
lhsUnit = this.getUnit();
CodeableConcept rhsUnit;
rhsUnit = that.getUnit();
if (!strategy.equals(LocatorUtils.property(thisLocator, "unit", lhsUnit), LocatorUtils.property(thatLocator, "unit", rhsUnit), lhsUnit, rhsUnit, (this.unit!= null), (that.unit!= 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;
}
}
{
DeviceMetricOperationalStatus lhsOperationalStatus;
lhsOperationalStatus = this.getOperationalStatus();
DeviceMetricOperationalStatus rhsOperationalStatus;
rhsOperationalStatus = that.getOperationalStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "operationalStatus", lhsOperationalStatus), LocatorUtils.property(thatLocator, "operationalStatus", rhsOperationalStatus), lhsOperationalStatus, rhsOperationalStatus, (this.operationalStatus!= null), (that.operationalStatus!= null))) {
return false;
}
}
{
DeviceMetricColor lhsColor;
lhsColor = this.getColor();
DeviceMetricColor rhsColor;
rhsColor = that.getColor();
if (!strategy.equals(LocatorUtils.property(thisLocator, "color", lhsColor), LocatorUtils.property(thatLocator, "color", rhsColor), lhsColor, rhsColor, (this.color!= null), (that.color!= null))) {
return false;
}
}
{
DeviceMetricCategory lhsCategory;
lhsCategory = this.getCategory();
DeviceMetricCategory rhsCategory;
rhsCategory = that.getCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "category", lhsCategory), LocatorUtils.property(thatLocator, "category", rhsCategory), lhsCategory, rhsCategory, (this.category!= null), (that.category!= null))) {
return false;
}
}
{
Timing lhsMeasurementPeriod;
lhsMeasurementPeriod = this.getMeasurementPeriod();
Timing rhsMeasurementPeriod;
rhsMeasurementPeriod = that.getMeasurementPeriod();
if (!strategy.equals(LocatorUtils.property(thisLocator, "measurementPeriod", lhsMeasurementPeriod), LocatorUtils.property(thatLocator, "measurementPeriod", rhsMeasurementPeriod), lhsMeasurementPeriod, rhsMeasurementPeriod, (this.measurementPeriod!= null), (that.measurementPeriod!= null))) {
return false;
}
}
{
List lhsCalibration;
lhsCalibration = (((this.calibration!= null)&&(!this.calibration.isEmpty()))?this.getCalibration():null);
List rhsCalibration;
rhsCalibration = (((that.calibration!= null)&&(!that.calibration.isEmpty()))?that.getCalibration():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "calibration", lhsCalibration), LocatorUtils.property(thatLocator, "calibration", rhsCalibration), lhsCalibration, rhsCalibration, ((this.calibration!= null)&&(!this.calibration.isEmpty())), ((that.calibration!= null)&&(!that.calibration.isEmpty())))) {
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));
}
{
CodeableConcept theUnit;
theUnit = this.getUnit();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "unit", theUnit), currentHashCode, theUnit, (this.unit!= 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));
}
{
DeviceMetricOperationalStatus theOperationalStatus;
theOperationalStatus = this.getOperationalStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "operationalStatus", theOperationalStatus), currentHashCode, theOperationalStatus, (this.operationalStatus!= null));
}
{
DeviceMetricColor theColor;
theColor = this.getColor();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "color", theColor), currentHashCode, theColor, (this.color!= null));
}
{
DeviceMetricCategory theCategory;
theCategory = this.getCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "category", theCategory), currentHashCode, theCategory, (this.category!= null));
}
{
Timing theMeasurementPeriod;
theMeasurementPeriod = this.getMeasurementPeriod();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "measurementPeriod", theMeasurementPeriod), currentHashCode, theMeasurementPeriod, (this.measurementPeriod!= null));
}
{
List theCalibration;
theCalibration = (((this.calibration!= null)&&(!this.calibration.isEmpty()))?this.getCalibration():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "calibration", theCalibration), currentHashCode, theCalibration, ((this.calibration!= null)&&(!this.calibration.isEmpty())));
}
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));
}
{
CodeableConcept theUnit;
theUnit = this.getUnit();
strategy.appendField(locator, this, "unit", buffer, theUnit, (this.unit!= 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));
}
{
DeviceMetricOperationalStatus theOperationalStatus;
theOperationalStatus = this.getOperationalStatus();
strategy.appendField(locator, this, "operationalStatus", buffer, theOperationalStatus, (this.operationalStatus!= null));
}
{
DeviceMetricColor theColor;
theColor = this.getColor();
strategy.appendField(locator, this, "color", buffer, theColor, (this.color!= null));
}
{
DeviceMetricCategory theCategory;
theCategory = this.getCategory();
strategy.appendField(locator, this, "category", buffer, theCategory, (this.category!= null));
}
{
Timing theMeasurementPeriod;
theMeasurementPeriod = this.getMeasurementPeriod();
strategy.appendField(locator, this, "measurementPeriod", buffer, theMeasurementPeriod, (this.measurementPeriod!= null));
}
{
List theCalibration;
theCalibration = (((this.calibration!= null)&&(!this.calibration.isEmpty()))?this.getCalibration():null);
strategy.appendField(locator, this, "calibration", buffer, theCalibration, ((this.calibration!= null)&&(!this.calibration.isEmpty())));
}
return buffer;
}
public void setCalibration(List value) {
this.calibration = value;
}
}