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

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

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.22.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.01.12 at 11:04:27 AM MST 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions
 * 
 * 

Java class for Address complex type. * *

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

 * <complexType name="Address">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}Element">
 *       <sequence>
 *         <element name="use" type="{http://hl7.org/fhir}AddressUse" minOccurs="0"/>
 *         <element name="type" type="{http://hl7.org/fhir}AddressType" minOccurs="0"/>
 *         <element name="text" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="line" type="{http://hl7.org/fhir}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="city" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="district" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="state" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="postalCode" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="country" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="period" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Address", propOrder = { "use", "type", "text", "line", "city", "district", "state", "postalCode", "country", "period" }) public class Address extends Element implements Equals, HashCode, ToString { protected AddressUse use; protected AddressType type; protected org.hl7.fhir.String text; protected List line; protected org.hl7.fhir.String city; protected org.hl7.fhir.String district; protected org.hl7.fhir.String state; protected org.hl7.fhir.String postalCode; protected org.hl7.fhir.String country; protected Period period; /** * Gets the value of the use property. * * @return * possible object is * {@link AddressUse } * */ public AddressUse getUse() { return use; } /** * Sets the value of the use property. * * @param value * allowed object is * {@link AddressUse } * */ public void setUse(AddressUse value) { this.use = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link AddressType } * */ public AddressType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link AddressType } * */ public void setType(AddressType value) { this.type = value; } /** * Gets the value of the text property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getText() { return text; } /** * Sets the value of the text property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setText(org.hl7.fhir.String value) { this.text = value; } /** * Gets the value of the line 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 JAXB object. * This is why there is not a set method for the line property. * *

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

     *    getLine().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link org.hl7.fhir.String } * * */ public List getLine() { if (line == null) { line = new ArrayList(); } return this.line; } /** * Gets the value of the city property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getCity() { return city; } /** * Sets the value of the city property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setCity(org.hl7.fhir.String value) { this.city = value; } /** * Gets the value of the district property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getDistrict() { return district; } /** * Sets the value of the district property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setDistrict(org.hl7.fhir.String value) { this.district = value; } /** * Gets the value of the state property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getState() { return state; } /** * Sets the value of the state property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setState(org.hl7.fhir.String value) { this.state = value; } /** * Gets the value of the postalCode property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getPostalCode() { return postalCode; } /** * Sets the value of the postalCode property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setPostalCode(org.hl7.fhir.String value) { this.postalCode = value; } /** * Gets the value of the country property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getCountry() { return country; } /** * Sets the value of the country property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setCountry(org.hl7.fhir.String value) { this.country = value; } /** * Gets the value of the period property. * * @return * possible object is * {@link Period } * */ public Period getPeriod() { return period; } /** * Sets the value of the period property. * * @param value * allowed object is * {@link Period } * */ public void setPeriod(Period value) { this.period = value; } public Address withUse(AddressUse value) { setUse(value); return this; } public Address withType(AddressType value) { setType(value); return this; } public Address withText(org.hl7.fhir.String value) { setText(value); return this; } public Address withLine(org.hl7.fhir.String... values) { if (values!= null) { for (org.hl7.fhir.String value: values) { getLine().add(value); } } return this; } public Address withLine(Collection values) { if (values!= null) { getLine().addAll(values); } return this; } public Address withCity(org.hl7.fhir.String value) { setCity(value); return this; } public Address withDistrict(org.hl7.fhir.String value) { setDistrict(value); return this; } public Address withState(org.hl7.fhir.String value) { setState(value); return this; } public Address withPostalCode(org.hl7.fhir.String value) { setPostalCode(value); return this; } public Address withCountry(org.hl7.fhir.String value) { setCountry(value); return this; } public Address withPeriod(Period value) { setPeriod(value); return this; } @Override public Address withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Address withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Address withId(java.lang.String value) { setId(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Address)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final Address that = ((Address) object); { AddressUse lhsUse; lhsUse = this.getUse(); AddressUse rhsUse; rhsUse = that.getUse(); if (!strategy.equals(LocatorUtils.property(thisLocator, "use", lhsUse), LocatorUtils.property(thatLocator, "use", rhsUse), lhsUse, rhsUse)) { return false; } } { AddressType lhsType; lhsType = this.getType(); AddressType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) { return false; } } { org.hl7.fhir.String lhsText; lhsText = this.getText(); org.hl7.fhir.String rhsText; rhsText = that.getText(); if (!strategy.equals(LocatorUtils.property(thisLocator, "text", lhsText), LocatorUtils.property(thatLocator, "text", rhsText), lhsText, rhsText)) { return false; } } { List lhsLine; lhsLine = (((this.line!= null)&&(!this.line.isEmpty()))?this.getLine():null); List rhsLine; rhsLine = (((that.line!= null)&&(!that.line.isEmpty()))?that.getLine():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "line", lhsLine), LocatorUtils.property(thatLocator, "line", rhsLine), lhsLine, rhsLine)) { return false; } } { org.hl7.fhir.String lhsCity; lhsCity = this.getCity(); org.hl7.fhir.String rhsCity; rhsCity = that.getCity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "city", lhsCity), LocatorUtils.property(thatLocator, "city", rhsCity), lhsCity, rhsCity)) { return false; } } { org.hl7.fhir.String lhsDistrict; lhsDistrict = this.getDistrict(); org.hl7.fhir.String rhsDistrict; rhsDistrict = that.getDistrict(); if (!strategy.equals(LocatorUtils.property(thisLocator, "district", lhsDistrict), LocatorUtils.property(thatLocator, "district", rhsDistrict), lhsDistrict, rhsDistrict)) { return false; } } { org.hl7.fhir.String lhsState; lhsState = this.getState(); org.hl7.fhir.String rhsState; rhsState = that.getState(); if (!strategy.equals(LocatorUtils.property(thisLocator, "state", lhsState), LocatorUtils.property(thatLocator, "state", rhsState), lhsState, rhsState)) { return false; } } { org.hl7.fhir.String lhsPostalCode; lhsPostalCode = this.getPostalCode(); org.hl7.fhir.String rhsPostalCode; rhsPostalCode = that.getPostalCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "postalCode", lhsPostalCode), LocatorUtils.property(thatLocator, "postalCode", rhsPostalCode), lhsPostalCode, rhsPostalCode)) { return false; } } { org.hl7.fhir.String lhsCountry; lhsCountry = this.getCountry(); org.hl7.fhir.String rhsCountry; rhsCountry = that.getCountry(); if (!strategy.equals(LocatorUtils.property(thisLocator, "country", lhsCountry), LocatorUtils.property(thatLocator, "country", rhsCountry), lhsCountry, rhsCountry)) { return false; } } { Period lhsPeriod; lhsPeriod = this.getPeriod(); Period rhsPeriod; rhsPeriod = that.getPeriod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "period", lhsPeriod), LocatorUtils.property(thatLocator, "period", rhsPeriod), lhsPeriod, rhsPeriod)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { AddressUse theUse; theUse = this.getUse(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "use", theUse), currentHashCode, theUse); } { AddressType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { org.hl7.fhir.String theText; theText = this.getText(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "text", theText), currentHashCode, theText); } { List theLine; theLine = (((this.line!= null)&&(!this.line.isEmpty()))?this.getLine():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "line", theLine), currentHashCode, theLine); } { org.hl7.fhir.String theCity; theCity = this.getCity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "city", theCity), currentHashCode, theCity); } { org.hl7.fhir.String theDistrict; theDistrict = this.getDistrict(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "district", theDistrict), currentHashCode, theDistrict); } { org.hl7.fhir.String theState; theState = this.getState(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "state", theState), currentHashCode, theState); } { org.hl7.fhir.String thePostalCode; thePostalCode = this.getPostalCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "postalCode", thePostalCode), currentHashCode, thePostalCode); } { org.hl7.fhir.String theCountry; theCountry = this.getCountry(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "country", theCountry), currentHashCode, theCountry); } { Period thePeriod; thePeriod = this.getPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { AddressUse theUse; theUse = this.getUse(); strategy.appendField(locator, this, "use", buffer, theUse); } { AddressType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { org.hl7.fhir.String theText; theText = this.getText(); strategy.appendField(locator, this, "text", buffer, theText); } { List theLine; theLine = (((this.line!= null)&&(!this.line.isEmpty()))?this.getLine():null); strategy.appendField(locator, this, "line", buffer, theLine); } { org.hl7.fhir.String theCity; theCity = this.getCity(); strategy.appendField(locator, this, "city", buffer, theCity); } { org.hl7.fhir.String theDistrict; theDistrict = this.getDistrict(); strategy.appendField(locator, this, "district", buffer, theDistrict); } { org.hl7.fhir.String theState; theState = this.getState(); strategy.appendField(locator, this, "state", buffer, theState); } { org.hl7.fhir.String thePostalCode; thePostalCode = this.getPostalCode(); strategy.appendField(locator, this, "postalCode", buffer, thePostalCode); } { org.hl7.fhir.String theCountry; theCountry = this.getCountry(); strategy.appendField(locator, this, "country", buffer, theCountry); } { Period thePeriod; thePeriod = this.getPeriod(); strategy.appendField(locator, this, "period", buffer, thePeriod); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy