org.hl7.fhir.SpecimenContainer 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.01.18 at 08:26:13 AM 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.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;
/**
* A sample to be used for analysis.
*
* Java class for Specimen.Container complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Specimen.Container">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="capacity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <element name="specimenQuantity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <choice minOccurs="0">
* <element name="additiveCodeableConcept" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="additiveReference" type="{http://hl7.org/fhir}Reference"/>
* </choice>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Specimen.Container", propOrder = {
"identifier",
"description",
"type",
"capacity",
"specimenQuantity",
"additiveCodeableConcept",
"additiveReference"
})
public class SpecimenContainer
extends BackboneElement
implements Equals2, HashCode2, ToString2
{
protected List identifier;
protected org.hl7.fhir.String description;
protected CodeableConcept type;
protected SimpleQuantity capacity;
protected SimpleQuantity specimenQuantity;
protected CodeableConcept additiveCodeableConcept;
protected Reference additiveReference;
/**
* Gets the value of the identifier 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 identifier property.
*
*
* For example, to add a new item, do as follows:
*
* getIdentifier().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Identifier }
*
*
*/
public List getIdentifier() {
if (identifier == null) {
identifier = new ArrayList();
}
return this.identifier;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setDescription(org.hl7.fhir.String value) {
this.description = value;
}
/**
* 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 capacity property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getCapacity() {
return capacity;
}
/**
* Sets the value of the capacity property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setCapacity(SimpleQuantity value) {
this.capacity = value;
}
/**
* Gets the value of the specimenQuantity property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getSpecimenQuantity() {
return specimenQuantity;
}
/**
* Sets the value of the specimenQuantity property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setSpecimenQuantity(SimpleQuantity value) {
this.specimenQuantity = value;
}
/**
* Gets the value of the additiveCodeableConcept property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getAdditiveCodeableConcept() {
return additiveCodeableConcept;
}
/**
* Sets the value of the additiveCodeableConcept property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setAdditiveCodeableConcept(CodeableConcept value) {
this.additiveCodeableConcept = value;
}
/**
* Gets the value of the additiveReference property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getAdditiveReference() {
return additiveReference;
}
/**
* Sets the value of the additiveReference property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setAdditiveReference(Reference value) {
this.additiveReference = value;
}
public SpecimenContainer withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public SpecimenContainer withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public SpecimenContainer withDescription(org.hl7.fhir.String value) {
setDescription(value);
return this;
}
public SpecimenContainer withType(CodeableConcept value) {
setType(value);
return this;
}
public SpecimenContainer withCapacity(SimpleQuantity value) {
setCapacity(value);
return this;
}
public SpecimenContainer withSpecimenQuantity(SimpleQuantity value) {
setSpecimenQuantity(value);
return this;
}
public SpecimenContainer withAdditiveCodeableConcept(CodeableConcept value) {
setAdditiveCodeableConcept(value);
return this;
}
public SpecimenContainer withAdditiveReference(Reference value) {
setAdditiveReference(value);
return this;
}
@Override
public SpecimenContainer withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public SpecimenContainer withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public SpecimenContainer withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public SpecimenContainer withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public SpecimenContainer withId(java.lang.String value) {
setId(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 SpecimenContainer that = ((SpecimenContainer) object);
{
List lhsIdentifier;
lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
List rhsIdentifier;
rhsIdentifier = (((that.identifier!= null)&&(!that.identifier.isEmpty()))?that.getIdentifier():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) {
return false;
}
}
{
org.hl7.fhir.String lhsDescription;
lhsDescription = this.getDescription();
org.hl7.fhir.String rhsDescription;
rhsDescription = that.getDescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription, (this.description!= null), (that.description!= null))) {
return false;
}
}
{
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;
}
}
{
SimpleQuantity lhsCapacity;
lhsCapacity = this.getCapacity();
SimpleQuantity rhsCapacity;
rhsCapacity = that.getCapacity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "capacity", lhsCapacity), LocatorUtils.property(thatLocator, "capacity", rhsCapacity), lhsCapacity, rhsCapacity, (this.capacity!= null), (that.capacity!= null))) {
return false;
}
}
{
SimpleQuantity lhsSpecimenQuantity;
lhsSpecimenQuantity = this.getSpecimenQuantity();
SimpleQuantity rhsSpecimenQuantity;
rhsSpecimenQuantity = that.getSpecimenQuantity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "specimenQuantity", lhsSpecimenQuantity), LocatorUtils.property(thatLocator, "specimenQuantity", rhsSpecimenQuantity), lhsSpecimenQuantity, rhsSpecimenQuantity, (this.specimenQuantity!= null), (that.specimenQuantity!= null))) {
return false;
}
}
{
CodeableConcept lhsAdditiveCodeableConcept;
lhsAdditiveCodeableConcept = this.getAdditiveCodeableConcept();
CodeableConcept rhsAdditiveCodeableConcept;
rhsAdditiveCodeableConcept = that.getAdditiveCodeableConcept();
if (!strategy.equals(LocatorUtils.property(thisLocator, "additiveCodeableConcept", lhsAdditiveCodeableConcept), LocatorUtils.property(thatLocator, "additiveCodeableConcept", rhsAdditiveCodeableConcept), lhsAdditiveCodeableConcept, rhsAdditiveCodeableConcept, (this.additiveCodeableConcept!= null), (that.additiveCodeableConcept!= null))) {
return false;
}
}
{
Reference lhsAdditiveReference;
lhsAdditiveReference = this.getAdditiveReference();
Reference rhsAdditiveReference;
rhsAdditiveReference = that.getAdditiveReference();
if (!strategy.equals(LocatorUtils.property(thisLocator, "additiveReference", lhsAdditiveReference), LocatorUtils.property(thatLocator, "additiveReference", rhsAdditiveReference), lhsAdditiveReference, rhsAdditiveReference, (this.additiveReference!= null), (that.additiveReference!= 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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null));
}
{
CodeableConcept theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
SimpleQuantity theCapacity;
theCapacity = this.getCapacity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "capacity", theCapacity), currentHashCode, theCapacity, (this.capacity!= null));
}
{
SimpleQuantity theSpecimenQuantity;
theSpecimenQuantity = this.getSpecimenQuantity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "specimenQuantity", theSpecimenQuantity), currentHashCode, theSpecimenQuantity, (this.specimenQuantity!= null));
}
{
CodeableConcept theAdditiveCodeableConcept;
theAdditiveCodeableConcept = this.getAdditiveCodeableConcept();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "additiveCodeableConcept", theAdditiveCodeableConcept), currentHashCode, theAdditiveCodeableConcept, (this.additiveCodeableConcept!= null));
}
{
Reference theAdditiveReference;
theAdditiveReference = this.getAdditiveReference();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "additiveReference", theAdditiveReference), currentHashCode, theAdditiveReference, (this.additiveReference!= 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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null));
}
{
CodeableConcept theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
SimpleQuantity theCapacity;
theCapacity = this.getCapacity();
strategy.appendField(locator, this, "capacity", buffer, theCapacity, (this.capacity!= null));
}
{
SimpleQuantity theSpecimenQuantity;
theSpecimenQuantity = this.getSpecimenQuantity();
strategy.appendField(locator, this, "specimenQuantity", buffer, theSpecimenQuantity, (this.specimenQuantity!= null));
}
{
CodeableConcept theAdditiveCodeableConcept;
theAdditiveCodeableConcept = this.getAdditiveCodeableConcept();
strategy.appendField(locator, this, "additiveCodeableConcept", buffer, theAdditiveCodeableConcept, (this.additiveCodeableConcept!= null));
}
{
Reference theAdditiveReference;
theAdditiveReference = this.getAdditiveReference();
strategy.appendField(locator, this, "additiveReference", buffer, theAdditiveReference, (this.additiveReference!= null));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
}