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

org.hl7.fhir.Questionnaire 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.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 Questionnaire complex type. * *

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

 * <complexType name="Questionnaire">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="url" type="{http://hl7.org/fhir}uri" minOccurs="0"/>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="version" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="status" type="{http://hl7.org/fhir}QuestionnaireStatus"/>
 *         <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="publisher" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="telecom" type="{http://hl7.org/fhir}ContactPoint" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="useContext" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="title" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="concept" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="subjectType" type="{http://hl7.org/fhir}code" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="item" type="{http://hl7.org/fhir}Questionnaire.Item" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Questionnaire", propOrder = { "url", "identifier", "version", "status", "date", "publisher", "telecom", "useContext", "title", "concept", "subjectType", "item" }) public class Questionnaire extends DomainResource implements Equals, HashCode, ToString { protected Uri url; protected List identifier; protected org.hl7.fhir.String version; @XmlElement(required = true) protected QuestionnaireStatus status; protected DateTime date; protected org.hl7.fhir.String publisher; protected List telecom; protected List useContext; protected org.hl7.fhir.String title; protected List concept; protected List subjectType; protected List item; /** * Gets the value of the url property. * * @return * possible object is * {@link Uri } * */ public Uri getUrl() { return url; } /** * Sets the value of the url property. * * @param value * allowed object is * {@link Uri } * */ public void setUrl(Uri value) { this.url = 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 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 List getIdentifier() { if (identifier == null) { identifier = new ArrayList(); } return this.identifier; } /** * Gets the value of the version property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setVersion(org.hl7.fhir.String value) { this.version = value; } /** * Gets the value of the status property. * * @return * possible object is * {@link QuestionnaireStatus } * */ public QuestionnaireStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link QuestionnaireStatus } * */ public void setStatus(QuestionnaireStatus value) { this.status = 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 publisher property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getPublisher() { return publisher; } /** * Sets the value of the publisher property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setPublisher(org.hl7.fhir.String value) { this.publisher = 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 JAXB 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 useContext 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 useContext property. * *

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

     *    getUseContext().add(newItem);
     * 
* * *

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

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

     *    getConcept().add(newItem);
     * 
* * *

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

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

     *    getSubjectType().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Code } * * */ public List getSubjectType() { if (subjectType == null) { subjectType = new ArrayList(); } return this.subjectType; } /** * 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 QuestionnaireItem } * * */ public List getItem() { if (item == null) { item = new ArrayList(); } return this.item; } public Questionnaire withUrl(Uri value) { setUrl(value); return this; } public Questionnaire withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public Questionnaire withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public Questionnaire withVersion(org.hl7.fhir.String value) { setVersion(value); return this; } public Questionnaire withStatus(QuestionnaireStatus value) { setStatus(value); return this; } public Questionnaire withDate(DateTime value) { setDate(value); return this; } public Questionnaire withPublisher(org.hl7.fhir.String value) { setPublisher(value); return this; } public Questionnaire withTelecom(ContactPoint... values) { if (values!= null) { for (ContactPoint value: values) { getTelecom().add(value); } } return this; } public Questionnaire withTelecom(Collection values) { if (values!= null) { getTelecom().addAll(values); } return this; } public Questionnaire withUseContext(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getUseContext().add(value); } } return this; } public Questionnaire withUseContext(Collection values) { if (values!= null) { getUseContext().addAll(values); } return this; } public Questionnaire withTitle(org.hl7.fhir.String value) { setTitle(value); return this; } public Questionnaire withConcept(Coding... values) { if (values!= null) { for (Coding value: values) { getConcept().add(value); } } return this; } public Questionnaire withConcept(Collection values) { if (values!= null) { getConcept().addAll(values); } return this; } public Questionnaire withSubjectType(Code... values) { if (values!= null) { for (Code value: values) { getSubjectType().add(value); } } return this; } public Questionnaire withSubjectType(Collection values) { if (values!= null) { getSubjectType().addAll(values); } return this; } public Questionnaire withItem(QuestionnaireItem... values) { if (values!= null) { for (QuestionnaireItem value: values) { getItem().add(value); } } return this; } public Questionnaire withItem(Collection values) { if (values!= null) { getItem().addAll(values); } return this; } @Override public Questionnaire withText(Narrative value) { setText(value); return this; } @Override public Questionnaire withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Questionnaire withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Questionnaire withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Questionnaire withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Questionnaire withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Questionnaire withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Questionnaire withId(Id value) { setId(value); return this; } @Override public Questionnaire withMeta(Meta value) { setMeta(value); return this; } @Override public Questionnaire withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Questionnaire withLanguage(Code value) { setLanguage(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Questionnaire)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final Questionnaire that = ((Questionnaire) object); { Uri lhsUrl; lhsUrl = this.getUrl(); Uri rhsUrl; rhsUrl = that.getUrl(); if (!strategy.equals(LocatorUtils.property(thisLocator, "url", lhsUrl), LocatorUtils.property(thatLocator, "url", rhsUrl), lhsUrl, rhsUrl)) { 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)) { return false; } } { org.hl7.fhir.String lhsVersion; lhsVersion = this.getVersion(); org.hl7.fhir.String rhsVersion; rhsVersion = that.getVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion)) { return false; } } { QuestionnaireStatus lhsStatus; lhsStatus = this.getStatus(); QuestionnaireStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { 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; } } { org.hl7.fhir.String lhsPublisher; lhsPublisher = this.getPublisher(); org.hl7.fhir.String rhsPublisher; rhsPublisher = that.getPublisher(); if (!strategy.equals(LocatorUtils.property(thisLocator, "publisher", lhsPublisher), LocatorUtils.property(thatLocator, "publisher", rhsPublisher), lhsPublisher, rhsPublisher)) { 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)) { return false; } } { List lhsUseContext; lhsUseContext = (((this.useContext!= null)&&(!this.useContext.isEmpty()))?this.getUseContext():null); List rhsUseContext; rhsUseContext = (((that.useContext!= null)&&(!that.useContext.isEmpty()))?that.getUseContext():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "useContext", lhsUseContext), LocatorUtils.property(thatLocator, "useContext", rhsUseContext), lhsUseContext, rhsUseContext)) { 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; } } { List lhsConcept; lhsConcept = (((this.concept!= null)&&(!this.concept.isEmpty()))?this.getConcept():null); List rhsConcept; rhsConcept = (((that.concept!= null)&&(!that.concept.isEmpty()))?that.getConcept():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "concept", lhsConcept), LocatorUtils.property(thatLocator, "concept", rhsConcept), lhsConcept, rhsConcept)) { return false; } } { List lhsSubjectType; lhsSubjectType = (((this.subjectType!= null)&&(!this.subjectType.isEmpty()))?this.getSubjectType():null); List rhsSubjectType; rhsSubjectType = (((that.subjectType!= null)&&(!that.subjectType.isEmpty()))?that.getSubjectType():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "subjectType", lhsSubjectType), LocatorUtils.property(thatLocator, "subjectType", rhsSubjectType), lhsSubjectType, rhsSubjectType)) { 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); { Uri theUrl; theUrl = this.getUrl(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "url", theUrl), currentHashCode, theUrl); } { List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier); } { org.hl7.fhir.String theVersion; theVersion = this.getVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion); } { QuestionnaireStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { DateTime theDate; theDate = this.getDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate); } { org.hl7.fhir.String thePublisher; thePublisher = this.getPublisher(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "publisher", thePublisher), currentHashCode, thePublisher); } { List theTelecom; theTelecom = (((this.telecom!= null)&&(!this.telecom.isEmpty()))?this.getTelecom():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "telecom", theTelecom), currentHashCode, theTelecom); } { List theUseContext; theUseContext = (((this.useContext!= null)&&(!this.useContext.isEmpty()))?this.getUseContext():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "useContext", theUseContext), currentHashCode, theUseContext); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "title", theTitle), currentHashCode, theTitle); } { List theConcept; theConcept = (((this.concept!= null)&&(!this.concept.isEmpty()))?this.getConcept():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "concept", theConcept), currentHashCode, theConcept); } { List theSubjectType; theSubjectType = (((this.subjectType!= null)&&(!this.subjectType.isEmpty()))?this.getSubjectType():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subjectType", theSubjectType), currentHashCode, theSubjectType); } { 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); { Uri theUrl; theUrl = this.getUrl(); strategy.appendField(locator, this, "url", buffer, theUrl); } { List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); strategy.appendField(locator, this, "identifier", buffer, theIdentifier); } { org.hl7.fhir.String theVersion; theVersion = this.getVersion(); strategy.appendField(locator, this, "version", buffer, theVersion); } { QuestionnaireStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { DateTime theDate; theDate = this.getDate(); strategy.appendField(locator, this, "date", buffer, theDate); } { org.hl7.fhir.String thePublisher; thePublisher = this.getPublisher(); strategy.appendField(locator, this, "publisher", buffer, thePublisher); } { List theTelecom; theTelecom = (((this.telecom!= null)&&(!this.telecom.isEmpty()))?this.getTelecom():null); strategy.appendField(locator, this, "telecom", buffer, theTelecom); } { List theUseContext; theUseContext = (((this.useContext!= null)&&(!this.useContext.isEmpty()))?this.getUseContext():null); strategy.appendField(locator, this, "useContext", buffer, theUseContext); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); strategy.appendField(locator, this, "title", buffer, theTitle); } { List theConcept; theConcept = (((this.concept!= null)&&(!this.concept.isEmpty()))?this.getConcept():null); strategy.appendField(locator, this, "concept", buffer, theConcept); } { List theSubjectType; theSubjectType = (((this.subjectType!= null)&&(!this.subjectType.isEmpty()))?this.getSubjectType():null); strategy.appendField(locator, this, "subjectType", buffer, theSubjectType); } { List theItem; theItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null); strategy.appendField(locator, this, "item", buffer, theItem); } return buffer; } }