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

org.hl7.fhir.List 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 javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
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 either a @value, an @id, or extensions
 * 
 * 

Java class for List complex type. * *

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

 * <complexType name="List">
 *   <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}ListStatus"/>
 *         <element name="mode" type="{http://hl7.org/fhir}ListMode"/>
 *         <element name="title" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="code" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="orderedBy" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="note" type="{http://hl7.org/fhir}Annotation" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="entry" type="{http://hl7.org/fhir}List.Entry" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="emptyReason" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "List", propOrder = { "identifier", "status", "mode", "title", "code", "subject", "encounter", "date", "source", "orderedBy", "note", "entry", "emptyReason" }) public class List extends DomainResource implements Equals, HashCode, ToString { protected java.util.List identifier; @XmlElement(required = true) protected ListStatus status; @XmlElement(required = true) protected ListMode mode; protected org.hl7.fhir.String title; protected CodeableConcept code; protected Reference subject; protected Reference encounter; protected DateTime date; protected Reference source; protected CodeableConcept orderedBy; protected java.util.List note; protected java.util.List entry; protected CodeableConcept emptyReason; /** * 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 JAXB 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 java.util.List getIdentifier() { if (identifier == null) { identifier = new ArrayList(); } return this.identifier; } /** * Gets the value of the status property. * * @return * possible object is * {@link ListStatus } * */ public ListStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link ListStatus } * */ public void setStatus(ListStatus value) { this.status = value; } /** * Gets the value of the mode property. * * @return * possible object is * {@link ListMode } * */ public ListMode getMode() { return mode; } /** * Sets the value of the mode property. * * @param value * allowed object is * {@link ListMode } * */ public void setMode(ListMode value) { this.mode = value; } /** * Gets the value of the title property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setTitle(org.hl7.fhir.String value) { this.title = value; } /** * 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 subject property. * * @return * possible object is * {@link Reference } * */ public Reference getSubject() { return subject; } /** * Sets the value of the subject property. * * @param value * allowed object is * {@link Reference } * */ public void setSubject(Reference value) { this.subject = value; } /** * Gets the value of the encounter property. * * @return * possible object is * {@link Reference } * */ public Reference getEncounter() { return encounter; } /** * Sets the value of the encounter property. * * @param value * allowed object is * {@link Reference } * */ public void setEncounter(Reference value) { this.encounter = value; } /** * Gets the value of the date property. * * @return * possible object is * {@link DateTime } * */ public DateTime getDate() { return date; } /** * Sets the value of the date property. * * @param value * allowed object is * {@link DateTime } * */ public void setDate(DateTime value) { this.date = value; } /** * Gets the value of the source property. * * @return * possible object is * {@link Reference } * */ public Reference getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link Reference } * */ public void setSource(Reference value) { this.source = value; } /** * Gets the value of the orderedBy property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getOrderedBy() { return orderedBy; } /** * Sets the value of the orderedBy property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setOrderedBy(CodeableConcept value) { this.orderedBy = value; } /** * Gets the value of the note 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 note property. * *

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

     *    getNote().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Annotation } * * */ public java.util.List getNote() { if (note == null) { note = new ArrayList(); } return this.note; } /** * Gets the value of the entry 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 entry property. * *

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

     *    getEntry().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ListEntry } * * */ public java.util.List getEntry() { if (entry == null) { entry = new ArrayList(); } return this.entry; } /** * Gets the value of the emptyReason property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getEmptyReason() { return emptyReason; } /** * Sets the value of the emptyReason property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setEmptyReason(CodeableConcept value) { this.emptyReason = value; } public List withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public List withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public List withStatus(ListStatus value) { setStatus(value); return this; } public List withMode(ListMode value) { setMode(value); return this; } public List withTitle(org.hl7.fhir.String value) { setTitle(value); return this; } public List withCode(CodeableConcept value) { setCode(value); return this; } public List withSubject(Reference value) { setSubject(value); return this; } public List withEncounter(Reference value) { setEncounter(value); return this; } public List withDate(DateTime value) { setDate(value); return this; } public List withSource(Reference value) { setSource(value); return this; } public List withOrderedBy(CodeableConcept value) { setOrderedBy(value); return this; } public List withNote(Annotation... values) { if (values!= null) { for (Annotation value: values) { getNote().add(value); } } return this; } public List withNote(Collection values) { if (values!= null) { getNote().addAll(values); } return this; } public List withEntry(ListEntry... values) { if (values!= null) { for (ListEntry value: values) { getEntry().add(value); } } return this; } public List withEntry(Collection values) { if (values!= null) { getEntry().addAll(values); } return this; } public List withEmptyReason(CodeableConcept value) { setEmptyReason(value); return this; } @Override public List withText(Narrative value) { setText(value); return this; } @Override public List withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public List withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public List withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public List withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public List withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public List withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public List withId(Id value) { setId(value); return this; } @Override public List withMeta(Meta value) { setMeta(value); return this; } @Override public List withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public List withLanguage(Code value) { setLanguage(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof List)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final List that = ((List) object); { java.util.List lhsIdentifier; lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); java.util.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)) { return false; } } { ListStatus lhsStatus; lhsStatus = this.getStatus(); ListStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { return false; } } { ListMode lhsMode; lhsMode = this.getMode(); ListMode rhsMode; rhsMode = that.getMode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "mode", lhsMode), LocatorUtils.property(thatLocator, "mode", rhsMode), lhsMode, rhsMode)) { return false; } } { org.hl7.fhir.String lhsTitle; lhsTitle = this.getTitle(); org.hl7.fhir.String rhsTitle; rhsTitle = that.getTitle(); if (!strategy.equals(LocatorUtils.property(thisLocator, "title", lhsTitle), LocatorUtils.property(thatLocator, "title", rhsTitle), lhsTitle, rhsTitle)) { 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)) { return false; } } { Reference lhsSubject; lhsSubject = this.getSubject(); Reference rhsSubject; rhsSubject = that.getSubject(); if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject)) { return false; } } { Reference lhsEncounter; lhsEncounter = this.getEncounter(); Reference rhsEncounter; rhsEncounter = that.getEncounter(); if (!strategy.equals(LocatorUtils.property(thisLocator, "encounter", lhsEncounter), LocatorUtils.property(thatLocator, "encounter", rhsEncounter), lhsEncounter, rhsEncounter)) { return false; } } { DateTime lhsDate; lhsDate = this.getDate(); DateTime rhsDate; rhsDate = that.getDate(); if (!strategy.equals(LocatorUtils.property(thisLocator, "date", lhsDate), LocatorUtils.property(thatLocator, "date", rhsDate), lhsDate, rhsDate)) { return false; } } { Reference lhsSource; lhsSource = this.getSource(); Reference rhsSource; rhsSource = that.getSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource)) { return false; } } { CodeableConcept lhsOrderedBy; lhsOrderedBy = this.getOrderedBy(); CodeableConcept rhsOrderedBy; rhsOrderedBy = that.getOrderedBy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "orderedBy", lhsOrderedBy), LocatorUtils.property(thatLocator, "orderedBy", rhsOrderedBy), lhsOrderedBy, rhsOrderedBy)) { return false; } } { java.util.List lhsNote; lhsNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); java.util.List rhsNote; rhsNote = (((that.note!= null)&&(!that.note.isEmpty()))?that.getNote():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "note", lhsNote), LocatorUtils.property(thatLocator, "note", rhsNote), lhsNote, rhsNote)) { return false; } } { java.util.List lhsEntry; lhsEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); java.util.List rhsEntry; rhsEntry = (((that.entry!= null)&&(!that.entry.isEmpty()))?that.getEntry():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entry", lhsEntry), LocatorUtils.property(thatLocator, "entry", rhsEntry), lhsEntry, rhsEntry)) { return false; } } { CodeableConcept lhsEmptyReason; lhsEmptyReason = this.getEmptyReason(); CodeableConcept rhsEmptyReason; rhsEmptyReason = that.getEmptyReason(); if (!strategy.equals(LocatorUtils.property(thisLocator, "emptyReason", lhsEmptyReason), LocatorUtils.property(thatLocator, "emptyReason", rhsEmptyReason), lhsEmptyReason, rhsEmptyReason)) { 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); { java.util.List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier); } { ListStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { ListMode theMode; theMode = this.getMode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "title", theTitle), currentHashCode, theTitle); } { CodeableConcept theCode; theCode = this.getCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode); } { Reference theSubject; theSubject = this.getSubject(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject); } { Reference theEncounter; theEncounter = this.getEncounter(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encounter", theEncounter), currentHashCode, theEncounter); } { DateTime theDate; theDate = this.getDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate); } { Reference theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource); } { CodeableConcept theOrderedBy; theOrderedBy = this.getOrderedBy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderedBy", theOrderedBy), currentHashCode, theOrderedBy); } { java.util.List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote); } { java.util.List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entry", theEntry), currentHashCode, theEntry); } { CodeableConcept theEmptyReason; theEmptyReason = this.getEmptyReason(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "emptyReason", theEmptyReason), currentHashCode, theEmptyReason); } 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); { java.util.List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); strategy.appendField(locator, this, "identifier", buffer, theIdentifier); } { ListStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { ListMode theMode; theMode = this.getMode(); strategy.appendField(locator, this, "mode", buffer, theMode); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); strategy.appendField(locator, this, "title", buffer, theTitle); } { CodeableConcept theCode; theCode = this.getCode(); strategy.appendField(locator, this, "code", buffer, theCode); } { Reference theSubject; theSubject = this.getSubject(); strategy.appendField(locator, this, "subject", buffer, theSubject); } { Reference theEncounter; theEncounter = this.getEncounter(); strategy.appendField(locator, this, "encounter", buffer, theEncounter); } { DateTime theDate; theDate = this.getDate(); strategy.appendField(locator, this, "date", buffer, theDate); } { Reference theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource); } { CodeableConcept theOrderedBy; theOrderedBy = this.getOrderedBy(); strategy.appendField(locator, this, "orderedBy", buffer, theOrderedBy); } { java.util.List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); strategy.appendField(locator, this, "note", buffer, theNote); } { java.util.List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); strategy.appendField(locator, this, "entry", buffer, theEntry); } { CodeableConcept theEmptyReason; theEmptyReason = this.getEmptyReason(); strategy.appendField(locator, this, "emptyReason", buffer, theEmptyReason); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy