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

org.hl7.fhir.Location 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.05.02 at 09:57:28 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.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 Location complex type. * *

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

 * <complexType name="Location">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="status" type="{http://hl7.org/fhir}LocationStatus" minOccurs="0"/>
 *         <element name="name" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="mode" type="{http://hl7.org/fhir}LocationMode" minOccurs="0"/>
 *         <element name="type" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="telecom" type="{http://hl7.org/fhir}ContactPoint" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="address" type="{http://hl7.org/fhir}Address" minOccurs="0"/>
 *         <element name="physicalType" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="position" type="{http://hl7.org/fhir}Location.Position" minOccurs="0"/>
 *         <element name="managingOrganization" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="partOf" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Location", propOrder = { "identifier", "status", "name", "description", "mode", "type", "telecom", "address", "physicalType", "position", "managingOrganization", "partOf" }) public class Location extends DomainResource implements Equals2, HashCode2, ToString2 { protected List identifier; protected LocationStatus status; protected org.hl7.fhir.String name; protected org.hl7.fhir.String description; protected LocationMode mode; protected CodeableConcept type; protected List telecom; protected Address address; protected CodeableConcept physicalType; protected LocationPosition position; protected Reference managingOrganization; protected Reference partOf; /** * 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 status property. * * @return * possible object is * {@link LocationStatus } * */ public LocationStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link LocationStatus } * */ public void setStatus(LocationStatus value) { this.status = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setName(org.hl7.fhir.String value) { this.name = value; } /** * 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 mode property. * * @return * possible object is * {@link LocationMode } * */ public LocationMode getMode() { return mode; } /** * Sets the value of the mode property. * * @param value * allowed object is * {@link LocationMode } * */ public void setMode(LocationMode value) { this.mode = 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 telecom 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 telecom property. * *

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

     *    getTelecom().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ContactPoint } * * */ public List getTelecom() { if (telecom == null) { telecom = new ArrayList(); } return this.telecom; } /** * Gets the value of the address property. * * @return * possible object is * {@link Address } * */ public Address getAddress() { return address; } /** * Sets the value of the address property. * * @param value * allowed object is * {@link Address } * */ public void setAddress(Address value) { this.address = value; } /** * Gets the value of the physicalType property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getPhysicalType() { return physicalType; } /** * Sets the value of the physicalType property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setPhysicalType(CodeableConcept value) { this.physicalType = value; } /** * Gets the value of the position property. * * @return * possible object is * {@link LocationPosition } * */ public LocationPosition getPosition() { return position; } /** * Sets the value of the position property. * * @param value * allowed object is * {@link LocationPosition } * */ public void setPosition(LocationPosition value) { this.position = value; } /** * Gets the value of the managingOrganization property. * * @return * possible object is * {@link Reference } * */ public Reference getManagingOrganization() { return managingOrganization; } /** * Sets the value of the managingOrganization property. * * @param value * allowed object is * {@link Reference } * */ public void setManagingOrganization(Reference value) { this.managingOrganization = value; } /** * Gets the value of the partOf property. * * @return * possible object is * {@link Reference } * */ public Reference getPartOf() { return partOf; } /** * Sets the value of the partOf property. * * @param value * allowed object is * {@link Reference } * */ public void setPartOf(Reference value) { this.partOf = value; } public Location withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public Location withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public Location withStatus(LocationStatus value) { setStatus(value); return this; } public Location withName(org.hl7.fhir.String value) { setName(value); return this; } public Location withDescription(org.hl7.fhir.String value) { setDescription(value); return this; } public Location withMode(LocationMode value) { setMode(value); return this; } public Location withType(CodeableConcept value) { setType(value); return this; } public Location withTelecom(ContactPoint... values) { if (values!= null) { for (ContactPoint value: values) { getTelecom().add(value); } } return this; } public Location withTelecom(Collection values) { if (values!= null) { getTelecom().addAll(values); } return this; } public Location withAddress(Address value) { setAddress(value); return this; } public Location withPhysicalType(CodeableConcept value) { setPhysicalType(value); return this; } public Location withPosition(LocationPosition value) { setPosition(value); return this; } public Location withManagingOrganization(Reference value) { setManagingOrganization(value); return this; } public Location withPartOf(Reference value) { setPartOf(value); return this; } @Override public Location withText(Narrative value) { setText(value); return this; } @Override public Location withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Location withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Location withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Location withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Location withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Location withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Location withId(Id value) { setId(value); return this; } @Override public Location withMeta(Meta value) { setMeta(value); return this; } @Override public Location withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Location 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 Location that = ((Location) 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; } } { LocationStatus lhsStatus; lhsStatus = this.getStatus(); LocationStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) { return false; } } { org.hl7.fhir.String lhsName; lhsName = this.getName(); org.hl7.fhir.String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) { 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; } } { LocationMode lhsMode; lhsMode = this.getMode(); LocationMode rhsMode; rhsMode = that.getMode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "mode", lhsMode), LocatorUtils.property(thatLocator, "mode", rhsMode), lhsMode, rhsMode, (this.mode!= null), (that.mode!= 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; } } { List lhsTelecom; lhsTelecom = (((this.telecom!= null)&&(!this.telecom.isEmpty()))?this.getTelecom():null); List rhsTelecom; rhsTelecom = (((that.telecom!= null)&&(!that.telecom.isEmpty()))?that.getTelecom():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "telecom", lhsTelecom), LocatorUtils.property(thatLocator, "telecom", rhsTelecom), lhsTelecom, rhsTelecom, ((this.telecom!= null)&&(!this.telecom.isEmpty())), ((that.telecom!= null)&&(!that.telecom.isEmpty())))) { return false; } } { Address lhsAddress; lhsAddress = this.getAddress(); Address rhsAddress; rhsAddress = that.getAddress(); if (!strategy.equals(LocatorUtils.property(thisLocator, "address", lhsAddress), LocatorUtils.property(thatLocator, "address", rhsAddress), lhsAddress, rhsAddress, (this.address!= null), (that.address!= null))) { return false; } } { CodeableConcept lhsPhysicalType; lhsPhysicalType = this.getPhysicalType(); CodeableConcept rhsPhysicalType; rhsPhysicalType = that.getPhysicalType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "physicalType", lhsPhysicalType), LocatorUtils.property(thatLocator, "physicalType", rhsPhysicalType), lhsPhysicalType, rhsPhysicalType, (this.physicalType!= null), (that.physicalType!= null))) { return false; } } { LocationPosition lhsPosition; lhsPosition = this.getPosition(); LocationPosition rhsPosition; rhsPosition = that.getPosition(); if (!strategy.equals(LocatorUtils.property(thisLocator, "position", lhsPosition), LocatorUtils.property(thatLocator, "position", rhsPosition), lhsPosition, rhsPosition, (this.position!= null), (that.position!= null))) { return false; } } { Reference lhsManagingOrganization; lhsManagingOrganization = this.getManagingOrganization(); Reference rhsManagingOrganization; rhsManagingOrganization = that.getManagingOrganization(); if (!strategy.equals(LocatorUtils.property(thisLocator, "managingOrganization", lhsManagingOrganization), LocatorUtils.property(thatLocator, "managingOrganization", rhsManagingOrganization), lhsManagingOrganization, rhsManagingOrganization, (this.managingOrganization!= null), (that.managingOrganization!= null))) { return false; } } { Reference lhsPartOf; lhsPartOf = this.getPartOf(); Reference rhsPartOf; rhsPartOf = that.getPartOf(); if (!strategy.equals(LocatorUtils.property(thisLocator, "partOf", lhsPartOf), LocatorUtils.property(thatLocator, "partOf", rhsPartOf), lhsPartOf, rhsPartOf, (this.partOf!= null), (that.partOf!= 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()))); } { LocationStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null)); } { org.hl7.fhir.String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null)); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { LocationMode theMode; theMode = this.getMode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode, (this.mode!= null)); } { CodeableConcept theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null)); } { List theTelecom; theTelecom = (((this.telecom!= null)&&(!this.telecom.isEmpty()))?this.getTelecom():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "telecom", theTelecom), currentHashCode, theTelecom, ((this.telecom!= null)&&(!this.telecom.isEmpty()))); } { Address theAddress; theAddress = this.getAddress(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "address", theAddress), currentHashCode, theAddress, (this.address!= null)); } { CodeableConcept thePhysicalType; thePhysicalType = this.getPhysicalType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "physicalType", thePhysicalType), currentHashCode, thePhysicalType, (this.physicalType!= null)); } { LocationPosition thePosition; thePosition = this.getPosition(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "position", thePosition), currentHashCode, thePosition, (this.position!= null)); } { Reference theManagingOrganization; theManagingOrganization = this.getManagingOrganization(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "managingOrganization", theManagingOrganization), currentHashCode, theManagingOrganization, (this.managingOrganization!= null)); } { Reference thePartOf; thePartOf = this.getPartOf(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partOf", thePartOf), currentHashCode, thePartOf, (this.partOf!= 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()))); } { LocationStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null)); } { org.hl7.fhir.String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null)); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } { LocationMode theMode; theMode = this.getMode(); strategy.appendField(locator, this, "mode", buffer, theMode, (this.mode!= null)); } { CodeableConcept theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { List theTelecom; theTelecom = (((this.telecom!= null)&&(!this.telecom.isEmpty()))?this.getTelecom():null); strategy.appendField(locator, this, "telecom", buffer, theTelecom, ((this.telecom!= null)&&(!this.telecom.isEmpty()))); } { Address theAddress; theAddress = this.getAddress(); strategy.appendField(locator, this, "address", buffer, theAddress, (this.address!= null)); } { CodeableConcept thePhysicalType; thePhysicalType = this.getPhysicalType(); strategy.appendField(locator, this, "physicalType", buffer, thePhysicalType, (this.physicalType!= null)); } { LocationPosition thePosition; thePosition = this.getPosition(); strategy.appendField(locator, this, "position", buffer, thePosition, (this.position!= null)); } { Reference theManagingOrganization; theManagingOrganization = this.getManagingOrganization(); strategy.appendField(locator, this, "managingOrganization", buffer, theManagingOrganization, (this.managingOrganization!= null)); } { Reference thePartOf; thePartOf = this.getPartOf(); strategy.appendField(locator, this, "partOf", buffer, thePartOf, (this.partOf!= null)); } return buffer; } public void setIdentifier(List value) { this.identifier = value; } public void setTelecom(List value) { this.telecom = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy