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

org.hl7.fhir.BodySite 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.03.21 at 12:42:34 PM 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 BodySite complex type. * *

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

 * <complexType name="BodySite">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="patient" type="{http://hl7.org/fhir}Reference"/>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="code" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="modifier" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="image" type="{http://hl7.org/fhir}Attachment" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BodySite", propOrder = { "patient", "identifier", "code", "modifier", "description", "image" }) public class BodySite extends DomainResource implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected Reference patient; protected List identifier; protected CodeableConcept code; protected List modifier; protected org.hl7.fhir.String description; protected List image; /** * Gets the value of the patient property. * * @return * possible object is * {@link Reference } * */ public Reference getPatient() { return patient; } /** * Sets the value of the patient property. * * @param value * allowed object is * {@link Reference } * */ public void setPatient(Reference value) { this.patient = value; } /** * 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 code property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setCode(CodeableConcept value) { this.code = value; } /** * Gets the value of the modifier 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 modifier property. * *

* For example, to add a new item, do as follows: *

     *    getModifier().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link CodeableConcept } * * */ public List getModifier() { if (modifier == null) { modifier = new ArrayList(); } return this.modifier; } /** * 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 image 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 image property. * *

* For example, to add a new item, do as follows: *

     *    getImage().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Attachment } * * */ public List getImage() { if (image == null) { image = new ArrayList(); } return this.image; } public BodySite withPatient(Reference value) { setPatient(value); return this; } public BodySite withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public BodySite withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public BodySite withCode(CodeableConcept value) { setCode(value); return this; } public BodySite withModifier(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getModifier().add(value); } } return this; } public BodySite withModifier(Collection values) { if (values!= null) { getModifier().addAll(values); } return this; } public BodySite withDescription(org.hl7.fhir.String value) { setDescription(value); return this; } public BodySite withImage(Attachment... values) { if (values!= null) { for (Attachment value: values) { getImage().add(value); } } return this; } public BodySite withImage(Collection values) { if (values!= null) { getImage().addAll(values); } return this; } @Override public BodySite withText(Narrative value) { setText(value); return this; } @Override public BodySite withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public BodySite withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public BodySite withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public BodySite withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public BodySite withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public BodySite withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public BodySite withId(Id value) { setId(value); return this; } @Override public BodySite withMeta(Meta value) { setMeta(value); return this; } @Override public BodySite withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public BodySite 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 BodySite that = ((BodySite) object); { Reference lhsPatient; lhsPatient = this.getPatient(); Reference rhsPatient; rhsPatient = that.getPatient(); if (!strategy.equals(LocatorUtils.property(thisLocator, "patient", lhsPatient), LocatorUtils.property(thatLocator, "patient", rhsPatient), lhsPatient, rhsPatient, (this.patient!= null), (that.patient!= null))) { return false; } } { 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; } } { CodeableConcept lhsCode; lhsCode = this.getCode(); CodeableConcept rhsCode; rhsCode = that.getCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode, (this.code!= null), (that.code!= null))) { return false; } } { List lhsModifier; lhsModifier = (((this.modifier!= null)&&(!this.modifier.isEmpty()))?this.getModifier():null); List rhsModifier; rhsModifier = (((that.modifier!= null)&&(!that.modifier.isEmpty()))?that.getModifier():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "modifier", lhsModifier), LocatorUtils.property(thatLocator, "modifier", rhsModifier), lhsModifier, rhsModifier, ((this.modifier!= null)&&(!this.modifier.isEmpty())), ((that.modifier!= null)&&(!that.modifier.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; } } { List lhsImage; lhsImage = (((this.image!= null)&&(!this.image.isEmpty()))?this.getImage():null); List rhsImage; rhsImage = (((that.image!= null)&&(!that.image.isEmpty()))?that.getImage():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "image", lhsImage), LocatorUtils.property(thatLocator, "image", rhsImage), lhsImage, rhsImage, ((this.image!= null)&&(!this.image.isEmpty())), ((that.image!= null)&&(!that.image.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); { Reference thePatient; thePatient = this.getPatient(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient, (this.patient!= null)); } { 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()))); } { CodeableConcept theCode; theCode = this.getCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode, (this.code!= null)); } { List theModifier; theModifier = (((this.modifier!= null)&&(!this.modifier.isEmpty()))?this.getModifier():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "modifier", theModifier), currentHashCode, theModifier, ((this.modifier!= null)&&(!this.modifier.isEmpty()))); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { List theImage; theImage = (((this.image!= null)&&(!this.image.isEmpty()))?this.getImage():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "image", theImage), currentHashCode, theImage, ((this.image!= null)&&(!this.image.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); { Reference thePatient; thePatient = this.getPatient(); strategy.appendField(locator, this, "patient", buffer, thePatient, (this.patient!= null)); } { 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()))); } { CodeableConcept theCode; theCode = this.getCode(); strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null)); } { List theModifier; theModifier = (((this.modifier!= null)&&(!this.modifier.isEmpty()))?this.getModifier():null); strategy.appendField(locator, this, "modifier", buffer, theModifier, ((this.modifier!= null)&&(!this.modifier.isEmpty()))); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } { List theImage; theImage = (((this.image!= null)&&(!this.image.isEmpty()))?this.getImage():null); strategy.appendField(locator, this, "image", buffer, theImage, ((this.image!= null)&&(!this.image.isEmpty()))); } return buffer; } public void setIdentifier(List value) { this.identifier = value; } public void setModifier(List value) { this.modifier = value; } public void setImage(List value) { this.image = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy