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

org.hl7.fhir.QuestionnaireResponseAnswer 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;


/**
 * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
 * 
 * 

Java class for QuestionnaireResponse.Answer complex type. * *

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

 * <complexType name="QuestionnaireResponse.Answer">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <choice minOccurs="0">
 *           <element name="valueBoolean" type="{http://hl7.org/fhir}boolean"/>
 *           <element name="valueDecimal" type="{http://hl7.org/fhir}decimal"/>
 *           <element name="valueInteger" type="{http://hl7.org/fhir}integer"/>
 *           <element name="valueDate" type="{http://hl7.org/fhir}date"/>
 *           <element name="valueDateTime" type="{http://hl7.org/fhir}dateTime"/>
 *           <element name="valueInstant" type="{http://hl7.org/fhir}instant"/>
 *           <element name="valueTime" type="{http://hl7.org/fhir}time"/>
 *           <element name="valueString" type="{http://hl7.org/fhir}string"/>
 *           <element name="valueUri" type="{http://hl7.org/fhir}uri"/>
 *           <element name="valueAttachment" type="{http://hl7.org/fhir}Attachment"/>
 *           <element name="valueCoding" type="{http://hl7.org/fhir}Coding"/>
 *           <element name="valueQuantity" type="{http://hl7.org/fhir}Quantity"/>
 *           <element name="valueReference" type="{http://hl7.org/fhir}Reference"/>
 *         </choice>
 *         <element name="item" type="{http://hl7.org/fhir}QuestionnaireResponse.Item" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "QuestionnaireResponse.Answer", propOrder = { "valueBoolean", "valueDecimal", "valueInteger", "valueDate", "valueDateTime", "valueInstant", "valueTime", "valueString", "valueUri", "valueAttachment", "valueCoding", "valueQuantity", "valueReference", "item" }) public class QuestionnaireResponseAnswer extends BackboneElement implements Equals, HashCode, ToString { protected Boolean valueBoolean; protected Decimal valueDecimal; protected Integer valueInteger; protected Date valueDate; protected DateTime valueDateTime; protected Instant valueInstant; protected Time valueTime; protected org.hl7.fhir.String valueString; protected Uri valueUri; protected Attachment valueAttachment; protected Coding valueCoding; protected Quantity valueQuantity; protected Reference valueReference; protected List item; /** * Gets the value of the valueBoolean property. * * @return * possible object is * {@link Boolean } * */ public Boolean getValueBoolean() { return valueBoolean; } /** * Sets the value of the valueBoolean property. * * @param value * allowed object is * {@link Boolean } * */ public void setValueBoolean(Boolean value) { this.valueBoolean = value; } /** * Gets the value of the valueDecimal property. * * @return * possible object is * {@link Decimal } * */ public Decimal getValueDecimal() { return valueDecimal; } /** * Sets the value of the valueDecimal property. * * @param value * allowed object is * {@link Decimal } * */ public void setValueDecimal(Decimal value) { this.valueDecimal = value; } /** * Gets the value of the valueInteger property. * * @return * possible object is * {@link Integer } * */ public Integer getValueInteger() { return valueInteger; } /** * Sets the value of the valueInteger property. * * @param value * allowed object is * {@link Integer } * */ public void setValueInteger(Integer value) { this.valueInteger = value; } /** * Gets the value of the valueDate property. * * @return * possible object is * {@link Date } * */ public Date getValueDate() { return valueDate; } /** * Sets the value of the valueDate property. * * @param value * allowed object is * {@link Date } * */ public void setValueDate(Date value) { this.valueDate = value; } /** * Gets the value of the valueDateTime property. * * @return * possible object is * {@link DateTime } * */ public DateTime getValueDateTime() { return valueDateTime; } /** * Sets the value of the valueDateTime property. * * @param value * allowed object is * {@link DateTime } * */ public void setValueDateTime(DateTime value) { this.valueDateTime = value; } /** * Gets the value of the valueInstant property. * * @return * possible object is * {@link Instant } * */ public Instant getValueInstant() { return valueInstant; } /** * Sets the value of the valueInstant property. * * @param value * allowed object is * {@link Instant } * */ public void setValueInstant(Instant value) { this.valueInstant = value; } /** * Gets the value of the valueTime property. * * @return * possible object is * {@link Time } * */ public Time getValueTime() { return valueTime; } /** * Sets the value of the valueTime property. * * @param value * allowed object is * {@link Time } * */ public void setValueTime(Time value) { this.valueTime = value; } /** * Gets the value of the valueString property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getValueString() { return valueString; } /** * Sets the value of the valueString property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setValueString(org.hl7.fhir.String value) { this.valueString = value; } /** * Gets the value of the valueUri property. * * @return * possible object is * {@link Uri } * */ public Uri getValueUri() { return valueUri; } /** * Sets the value of the valueUri property. * * @param value * allowed object is * {@link Uri } * */ public void setValueUri(Uri value) { this.valueUri = value; } /** * Gets the value of the valueAttachment property. * * @return * possible object is * {@link Attachment } * */ public Attachment getValueAttachment() { return valueAttachment; } /** * Sets the value of the valueAttachment property. * * @param value * allowed object is * {@link Attachment } * */ public void setValueAttachment(Attachment value) { this.valueAttachment = value; } /** * Gets the value of the valueCoding property. * * @return * possible object is * {@link Coding } * */ public Coding getValueCoding() { return valueCoding; } /** * Sets the value of the valueCoding property. * * @param value * allowed object is * {@link Coding } * */ public void setValueCoding(Coding value) { this.valueCoding = value; } /** * Gets the value of the valueQuantity property. * * @return * possible object is * {@link Quantity } * */ public Quantity getValueQuantity() { return valueQuantity; } /** * Sets the value of the valueQuantity property. * * @param value * allowed object is * {@link Quantity } * */ public void setValueQuantity(Quantity value) { this.valueQuantity = value; } /** * Gets the value of the valueReference property. * * @return * possible object is * {@link Reference } * */ public Reference getValueReference() { return valueReference; } /** * Sets the value of the valueReference property. * * @param value * allowed object is * {@link Reference } * */ public void setValueReference(Reference value) { this.valueReference = value; } /** * Gets the value of the item 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 item property. * *

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

     *    getItem().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link QuestionnaireResponseItem } * * */ public List getItem() { if (item == null) { item = new ArrayList(); } return this.item; } public QuestionnaireResponseAnswer withValueBoolean(Boolean value) { setValueBoolean(value); return this; } public QuestionnaireResponseAnswer withValueDecimal(Decimal value) { setValueDecimal(value); return this; } public QuestionnaireResponseAnswer withValueInteger(Integer value) { setValueInteger(value); return this; } public QuestionnaireResponseAnswer withValueDate(Date value) { setValueDate(value); return this; } public QuestionnaireResponseAnswer withValueDateTime(DateTime value) { setValueDateTime(value); return this; } public QuestionnaireResponseAnswer withValueInstant(Instant value) { setValueInstant(value); return this; } public QuestionnaireResponseAnswer withValueTime(Time value) { setValueTime(value); return this; } public QuestionnaireResponseAnswer withValueString(org.hl7.fhir.String value) { setValueString(value); return this; } public QuestionnaireResponseAnswer withValueUri(Uri value) { setValueUri(value); return this; } public QuestionnaireResponseAnswer withValueAttachment(Attachment value) { setValueAttachment(value); return this; } public QuestionnaireResponseAnswer withValueCoding(Coding value) { setValueCoding(value); return this; } public QuestionnaireResponseAnswer withValueQuantity(Quantity value) { setValueQuantity(value); return this; } public QuestionnaireResponseAnswer withValueReference(Reference value) { setValueReference(value); return this; } public QuestionnaireResponseAnswer withItem(QuestionnaireResponseItem... values) { if (values!= null) { for (QuestionnaireResponseItem value: values) { getItem().add(value); } } return this; } public QuestionnaireResponseAnswer withItem(Collection values) { if (values!= null) { getItem().addAll(values); } return this; } @Override public QuestionnaireResponseAnswer withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public QuestionnaireResponseAnswer withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public QuestionnaireResponseAnswer withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public QuestionnaireResponseAnswer withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public QuestionnaireResponseAnswer withId(java.lang.String value) { setId(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof QuestionnaireResponseAnswer)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final QuestionnaireResponseAnswer that = ((QuestionnaireResponseAnswer) object); { Boolean lhsValueBoolean; lhsValueBoolean = this.getValueBoolean(); Boolean rhsValueBoolean; rhsValueBoolean = that.getValueBoolean(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueBoolean", lhsValueBoolean), LocatorUtils.property(thatLocator, "valueBoolean", rhsValueBoolean), lhsValueBoolean, rhsValueBoolean)) { return false; } } { Decimal lhsValueDecimal; lhsValueDecimal = this.getValueDecimal(); Decimal rhsValueDecimal; rhsValueDecimal = that.getValueDecimal(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueDecimal", lhsValueDecimal), LocatorUtils.property(thatLocator, "valueDecimal", rhsValueDecimal), lhsValueDecimal, rhsValueDecimal)) { return false; } } { Integer lhsValueInteger; lhsValueInteger = this.getValueInteger(); Integer rhsValueInteger; rhsValueInteger = that.getValueInteger(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueInteger", lhsValueInteger), LocatorUtils.property(thatLocator, "valueInteger", rhsValueInteger), lhsValueInteger, rhsValueInteger)) { return false; } } { Date lhsValueDate; lhsValueDate = this.getValueDate(); Date rhsValueDate; rhsValueDate = that.getValueDate(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueDate", lhsValueDate), LocatorUtils.property(thatLocator, "valueDate", rhsValueDate), lhsValueDate, rhsValueDate)) { return false; } } { DateTime lhsValueDateTime; lhsValueDateTime = this.getValueDateTime(); DateTime rhsValueDateTime; rhsValueDateTime = that.getValueDateTime(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueDateTime", lhsValueDateTime), LocatorUtils.property(thatLocator, "valueDateTime", rhsValueDateTime), lhsValueDateTime, rhsValueDateTime)) { return false; } } { Instant lhsValueInstant; lhsValueInstant = this.getValueInstant(); Instant rhsValueInstant; rhsValueInstant = that.getValueInstant(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueInstant", lhsValueInstant), LocatorUtils.property(thatLocator, "valueInstant", rhsValueInstant), lhsValueInstant, rhsValueInstant)) { return false; } } { Time lhsValueTime; lhsValueTime = this.getValueTime(); Time rhsValueTime; rhsValueTime = that.getValueTime(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueTime", lhsValueTime), LocatorUtils.property(thatLocator, "valueTime", rhsValueTime), lhsValueTime, rhsValueTime)) { return false; } } { org.hl7.fhir.String lhsValueString; lhsValueString = this.getValueString(); org.hl7.fhir.String rhsValueString; rhsValueString = that.getValueString(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueString", lhsValueString), LocatorUtils.property(thatLocator, "valueString", rhsValueString), lhsValueString, rhsValueString)) { return false; } } { Uri lhsValueUri; lhsValueUri = this.getValueUri(); Uri rhsValueUri; rhsValueUri = that.getValueUri(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueUri", lhsValueUri), LocatorUtils.property(thatLocator, "valueUri", rhsValueUri), lhsValueUri, rhsValueUri)) { return false; } } { Attachment lhsValueAttachment; lhsValueAttachment = this.getValueAttachment(); Attachment rhsValueAttachment; rhsValueAttachment = that.getValueAttachment(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueAttachment", lhsValueAttachment), LocatorUtils.property(thatLocator, "valueAttachment", rhsValueAttachment), lhsValueAttachment, rhsValueAttachment)) { return false; } } { Coding lhsValueCoding; lhsValueCoding = this.getValueCoding(); Coding rhsValueCoding; rhsValueCoding = that.getValueCoding(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueCoding", lhsValueCoding), LocatorUtils.property(thatLocator, "valueCoding", rhsValueCoding), lhsValueCoding, rhsValueCoding)) { return false; } } { Quantity lhsValueQuantity; lhsValueQuantity = this.getValueQuantity(); Quantity rhsValueQuantity; rhsValueQuantity = that.getValueQuantity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueQuantity", lhsValueQuantity), LocatorUtils.property(thatLocator, "valueQuantity", rhsValueQuantity), lhsValueQuantity, rhsValueQuantity)) { return false; } } { Reference lhsValueReference; lhsValueReference = this.getValueReference(); Reference rhsValueReference; rhsValueReference = that.getValueReference(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valueReference", lhsValueReference), LocatorUtils.property(thatLocator, "valueReference", rhsValueReference), lhsValueReference, rhsValueReference)) { return false; } } { List lhsItem; lhsItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null); List rhsItem; rhsItem = (((that.item!= null)&&(!that.item.isEmpty()))?that.getItem():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "item", lhsItem), LocatorUtils.property(thatLocator, "item", rhsItem), lhsItem, rhsItem)) { 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); { Boolean theValueBoolean; theValueBoolean = this.getValueBoolean(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueBoolean", theValueBoolean), currentHashCode, theValueBoolean); } { Decimal theValueDecimal; theValueDecimal = this.getValueDecimal(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueDecimal", theValueDecimal), currentHashCode, theValueDecimal); } { Integer theValueInteger; theValueInteger = this.getValueInteger(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueInteger", theValueInteger), currentHashCode, theValueInteger); } { Date theValueDate; theValueDate = this.getValueDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueDate", theValueDate), currentHashCode, theValueDate); } { DateTime theValueDateTime; theValueDateTime = this.getValueDateTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueDateTime", theValueDateTime), currentHashCode, theValueDateTime); } { Instant theValueInstant; theValueInstant = this.getValueInstant(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueInstant", theValueInstant), currentHashCode, theValueInstant); } { Time theValueTime; theValueTime = this.getValueTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueTime", theValueTime), currentHashCode, theValueTime); } { org.hl7.fhir.String theValueString; theValueString = this.getValueString(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueString", theValueString), currentHashCode, theValueString); } { Uri theValueUri; theValueUri = this.getValueUri(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueUri", theValueUri), currentHashCode, theValueUri); } { Attachment theValueAttachment; theValueAttachment = this.getValueAttachment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueAttachment", theValueAttachment), currentHashCode, theValueAttachment); } { Coding theValueCoding; theValueCoding = this.getValueCoding(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueCoding", theValueCoding), currentHashCode, theValueCoding); } { Quantity theValueQuantity; theValueQuantity = this.getValueQuantity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueQuantity", theValueQuantity), currentHashCode, theValueQuantity); } { Reference theValueReference; theValueReference = this.getValueReference(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueReference", theValueReference), currentHashCode, theValueReference); } { List theItem; theItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "item", theItem), currentHashCode, theItem); } 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); { Boolean theValueBoolean; theValueBoolean = this.getValueBoolean(); strategy.appendField(locator, this, "valueBoolean", buffer, theValueBoolean); } { Decimal theValueDecimal; theValueDecimal = this.getValueDecimal(); strategy.appendField(locator, this, "valueDecimal", buffer, theValueDecimal); } { Integer theValueInteger; theValueInteger = this.getValueInteger(); strategy.appendField(locator, this, "valueInteger", buffer, theValueInteger); } { Date theValueDate; theValueDate = this.getValueDate(); strategy.appendField(locator, this, "valueDate", buffer, theValueDate); } { DateTime theValueDateTime; theValueDateTime = this.getValueDateTime(); strategy.appendField(locator, this, "valueDateTime", buffer, theValueDateTime); } { Instant theValueInstant; theValueInstant = this.getValueInstant(); strategy.appendField(locator, this, "valueInstant", buffer, theValueInstant); } { Time theValueTime; theValueTime = this.getValueTime(); strategy.appendField(locator, this, "valueTime", buffer, theValueTime); } { org.hl7.fhir.String theValueString; theValueString = this.getValueString(); strategy.appendField(locator, this, "valueString", buffer, theValueString); } { Uri theValueUri; theValueUri = this.getValueUri(); strategy.appendField(locator, this, "valueUri", buffer, theValueUri); } { Attachment theValueAttachment; theValueAttachment = this.getValueAttachment(); strategy.appendField(locator, this, "valueAttachment", buffer, theValueAttachment); } { Coding theValueCoding; theValueCoding = this.getValueCoding(); strategy.appendField(locator, this, "valueCoding", buffer, theValueCoding); } { Quantity theValueQuantity; theValueQuantity = this.getValueQuantity(); strategy.appendField(locator, this, "valueQuantity", buffer, theValueQuantity); } { Reference theValueReference; theValueReference = this.getValueReference(); strategy.appendField(locator, this, "valueReference", buffer, theValueReference); } { List theItem; theItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null); strategy.appendField(locator, this, "item", buffer, theItem); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy