All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.SpecimenCollection Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
//
// 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.06.14 at 01:52:11 PM MDT 
//


package org.hl7.fhir;

import java.util.Collection;
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.Collection complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Specimen.Collection">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="collector" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="comment" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <choice minOccurs="0">
 *           <element name="collectedDateTime" type="{http://hl7.org/fhir}dateTime"/>
 *           <element name="collectedPeriod" type="{http://hl7.org/fhir}Period"/>
 *         </choice>
 *         <element name="quantity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
 *         <element name="method" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="bodySite" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Specimen.Collection", propOrder = { "collector", "comment", "collectedDateTime", "collectedPeriod", "quantity", "method", "bodySite" }) public class SpecimenCollection extends BackboneElement implements Equals2, HashCode2, ToString2 { protected Reference collector; protected org.hl7.fhir.String comment; protected DateTime collectedDateTime; protected Period collectedPeriod; protected SimpleQuantity quantity; protected CodeableConcept method; protected CodeableConcept bodySite; /** * Gets the value of the collector property. * * @return * possible object is * {@link Reference } * */ public Reference getCollector() { return collector; } /** * Sets the value of the collector property. * * @param value * allowed object is * {@link Reference } * */ public void setCollector(Reference value) { this.collector = value; } /** * Gets the value of the comment property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getComment() { return comment; } /** * Sets the value of the comment property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setComment(org.hl7.fhir.String value) { this.comment = value; } /** * Gets the value of the collectedDateTime property. * * @return * possible object is * {@link DateTime } * */ public DateTime getCollectedDateTime() { return collectedDateTime; } /** * Sets the value of the collectedDateTime property. * * @param value * allowed object is * {@link DateTime } * */ public void setCollectedDateTime(DateTime value) { this.collectedDateTime = value; } /** * Gets the value of the collectedPeriod property. * * @return * possible object is * {@link Period } * */ public Period getCollectedPeriod() { return collectedPeriod; } /** * Sets the value of the collectedPeriod property. * * @param value * allowed object is * {@link Period } * */ public void setCollectedPeriod(Period value) { this.collectedPeriod = value; } /** * Gets the value of the quantity property. * * @return * possible object is * {@link SimpleQuantity } * */ public SimpleQuantity getQuantity() { return quantity; } /** * Sets the value of the quantity property. * * @param value * allowed object is * {@link SimpleQuantity } * */ public void setQuantity(SimpleQuantity value) { this.quantity = value; } /** * Gets the value of the method property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getMethod() { return method; } /** * Sets the value of the method property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setMethod(CodeableConcept value) { this.method = value; } /** * Gets the value of the bodySite property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getBodySite() { return bodySite; } /** * Sets the value of the bodySite property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setBodySite(CodeableConcept value) { this.bodySite = value; } public SpecimenCollection withCollector(Reference value) { setCollector(value); return this; } public SpecimenCollection withComment(org.hl7.fhir.String value) { setComment(value); return this; } public SpecimenCollection withCollectedDateTime(DateTime value) { setCollectedDateTime(value); return this; } public SpecimenCollection withCollectedPeriod(Period value) { setCollectedPeriod(value); return this; } public SpecimenCollection withQuantity(SimpleQuantity value) { setQuantity(value); return this; } public SpecimenCollection withMethod(CodeableConcept value) { setMethod(value); return this; } public SpecimenCollection withBodySite(CodeableConcept value) { setBodySite(value); return this; } @Override public SpecimenCollection withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public SpecimenCollection withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public SpecimenCollection withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public SpecimenCollection withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public SpecimenCollection 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 SpecimenCollection that = ((SpecimenCollection) object); { Reference lhsCollector; lhsCollector = this.getCollector(); Reference rhsCollector; rhsCollector = that.getCollector(); if (!strategy.equals(LocatorUtils.property(thisLocator, "collector", lhsCollector), LocatorUtils.property(thatLocator, "collector", rhsCollector), lhsCollector, rhsCollector, (this.collector!= null), (that.collector!= null))) { return false; } } { org.hl7.fhir.String lhsComment; lhsComment = this.getComment(); org.hl7.fhir.String rhsComment; rhsComment = that.getComment(); if (!strategy.equals(LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment, (this.comment!= null), (that.comment!= null))) { return false; } } { DateTime lhsCollectedDateTime; lhsCollectedDateTime = this.getCollectedDateTime(); DateTime rhsCollectedDateTime; rhsCollectedDateTime = that.getCollectedDateTime(); if (!strategy.equals(LocatorUtils.property(thisLocator, "collectedDateTime", lhsCollectedDateTime), LocatorUtils.property(thatLocator, "collectedDateTime", rhsCollectedDateTime), lhsCollectedDateTime, rhsCollectedDateTime, (this.collectedDateTime!= null), (that.collectedDateTime!= null))) { return false; } } { Period lhsCollectedPeriod; lhsCollectedPeriod = this.getCollectedPeriod(); Period rhsCollectedPeriod; rhsCollectedPeriod = that.getCollectedPeriod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "collectedPeriod", lhsCollectedPeriod), LocatorUtils.property(thatLocator, "collectedPeriod", rhsCollectedPeriod), lhsCollectedPeriod, rhsCollectedPeriod, (this.collectedPeriod!= null), (that.collectedPeriod!= null))) { return false; } } { SimpleQuantity lhsQuantity; lhsQuantity = this.getQuantity(); SimpleQuantity rhsQuantity; rhsQuantity = that.getQuantity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity, (this.quantity!= null), (that.quantity!= null))) { return false; } } { CodeableConcept lhsMethod; lhsMethod = this.getMethod(); CodeableConcept rhsMethod; rhsMethod = that.getMethod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "method", lhsMethod), LocatorUtils.property(thatLocator, "method", rhsMethod), lhsMethod, rhsMethod, (this.method!= null), (that.method!= null))) { return false; } } { CodeableConcept lhsBodySite; lhsBodySite = this.getBodySite(); CodeableConcept rhsBodySite; rhsBodySite = that.getBodySite(); if (!strategy.equals(LocatorUtils.property(thisLocator, "bodySite", lhsBodySite), LocatorUtils.property(thatLocator, "bodySite", rhsBodySite), lhsBodySite, rhsBodySite, (this.bodySite!= null), (that.bodySite!= 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); { Reference theCollector; theCollector = this.getCollector(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "collector", theCollector), currentHashCode, theCollector, (this.collector!= null)); } { org.hl7.fhir.String theComment; theComment = this.getComment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment, (this.comment!= null)); } { DateTime theCollectedDateTime; theCollectedDateTime = this.getCollectedDateTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "collectedDateTime", theCollectedDateTime), currentHashCode, theCollectedDateTime, (this.collectedDateTime!= null)); } { Period theCollectedPeriod; theCollectedPeriod = this.getCollectedPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "collectedPeriod", theCollectedPeriod), currentHashCode, theCollectedPeriod, (this.collectedPeriod!= null)); } { SimpleQuantity theQuantity; theQuantity = this.getQuantity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity, (this.quantity!= null)); } { CodeableConcept theMethod; theMethod = this.getMethod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "method", theMethod), currentHashCode, theMethod, (this.method!= null)); } { CodeableConcept theBodySite; theBodySite = this.getBodySite(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "bodySite", theBodySite), currentHashCode, theBodySite, (this.bodySite!= 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); { Reference theCollector; theCollector = this.getCollector(); strategy.appendField(locator, this, "collector", buffer, theCollector, (this.collector!= null)); } { org.hl7.fhir.String theComment; theComment = this.getComment(); strategy.appendField(locator, this, "comment", buffer, theComment, (this.comment!= null)); } { DateTime theCollectedDateTime; theCollectedDateTime = this.getCollectedDateTime(); strategy.appendField(locator, this, "collectedDateTime", buffer, theCollectedDateTime, (this.collectedDateTime!= null)); } { Period theCollectedPeriod; theCollectedPeriod = this.getCollectedPeriod(); strategy.appendField(locator, this, "collectedPeriod", buffer, theCollectedPeriod, (this.collectedPeriod!= null)); } { SimpleQuantity theQuantity; theQuantity = this.getQuantity(); strategy.appendField(locator, this, "quantity", buffer, theQuantity, (this.quantity!= null)); } { CodeableConcept theMethod; theMethod = this.getMethod(); strategy.appendField(locator, this, "method", buffer, theMethod, (this.method!= null)); } { CodeableConcept theBodySite; theBodySite = this.getBodySite(); strategy.appendField(locator, this, "bodySite", buffer, theBodySite, (this.bodySite!= null)); } return buffer; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy