
org.hl7.fhir.CompositionSection Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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 set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
*
* Java class for Composition.Section complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Composition.Section">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="title" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="code" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="text" type="{http://hl7.org/fhir}Narrative" minOccurs="0"/>
* <element name="mode" type="{http://hl7.org/fhir}code" minOccurs="0"/>
* <element name="orderedBy" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="entry" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="emptyReason" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="section" type="{http://hl7.org/fhir}Composition.Section" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Composition.Section", propOrder = {
"title",
"code",
"text",
"mode",
"orderedBy",
"entry",
"emptyReason",
"section"
})
public class CompositionSection
extends BackboneElement
implements Equals, HashCode, ToString
{
protected org.hl7.fhir.String title;
protected CodeableConcept code;
protected Narrative text;
protected Code mode;
protected CodeableConcept orderedBy;
protected List entry;
protected CodeableConcept emptyReason;
protected List section;
/**
* 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 text property.
*
* @return
* possible object is
* {@link Narrative }
*
*/
public Narrative getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link Narrative }
*
*/
public void setText(Narrative value) {
this.text = value;
}
/**
* Gets the value of the mode property.
*
* @return
* possible object is
* {@link Code }
*
*/
public Code getMode() {
return mode;
}
/**
* Sets the value of the mode property.
*
* @param value
* allowed object is
* {@link Code }
*
*/
public void setMode(Code value) {
this.mode = 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 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 Reference }
*
*
*/
public 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;
}
/**
* Gets the value of the section 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 section property.
*
*
* For example, to add a new item, do as follows:
*
* getSection().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CompositionSection }
*
*
*/
public List getSection() {
if (section == null) {
section = new ArrayList();
}
return this.section;
}
public CompositionSection withTitle(org.hl7.fhir.String value) {
setTitle(value);
return this;
}
public CompositionSection withCode(CodeableConcept value) {
setCode(value);
return this;
}
public CompositionSection withText(Narrative value) {
setText(value);
return this;
}
public CompositionSection withMode(Code value) {
setMode(value);
return this;
}
public CompositionSection withOrderedBy(CodeableConcept value) {
setOrderedBy(value);
return this;
}
public CompositionSection withEntry(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getEntry().add(value);
}
}
return this;
}
public CompositionSection withEntry(Collection values) {
if (values!= null) {
getEntry().addAll(values);
}
return this;
}
public CompositionSection withEmptyReason(CodeableConcept value) {
setEmptyReason(value);
return this;
}
public CompositionSection withSection(CompositionSection... values) {
if (values!= null) {
for (CompositionSection value: values) {
getSection().add(value);
}
}
return this;
}
public CompositionSection withSection(Collection values) {
if (values!= null) {
getSection().addAll(values);
}
return this;
}
@Override
public CompositionSection withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public CompositionSection withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public CompositionSection withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public CompositionSection withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public CompositionSection withId(java.lang.String value) {
setId(value);
return this;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof CompositionSection)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final CompositionSection that = ((CompositionSection) object);
{
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;
}
}
{
Narrative lhsText;
lhsText = this.getText();
Narrative rhsText;
rhsText = that.getText();
if (!strategy.equals(LocatorUtils.property(thisLocator, "text", lhsText), LocatorUtils.property(thatLocator, "text", rhsText), lhsText, rhsText)) {
return false;
}
}
{
Code lhsMode;
lhsMode = this.getMode();
Code rhsMode;
rhsMode = that.getMode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "mode", lhsMode), LocatorUtils.property(thatLocator, "mode", rhsMode), lhsMode, rhsMode)) {
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;
}
}
{
List lhsEntry;
lhsEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null);
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;
}
}
{
List lhsSection;
lhsSection = (((this.section!= null)&&(!this.section.isEmpty()))?this.getSection():null);
List rhsSection;
rhsSection = (((that.section!= null)&&(!that.section.isEmpty()))?that.getSection():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "section", lhsSection), LocatorUtils.property(thatLocator, "section", rhsSection), lhsSection, rhsSection)) {
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);
{
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);
}
{
Narrative theText;
theText = this.getText();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "text", theText), currentHashCode, theText);
}
{
Code theMode;
theMode = this.getMode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode);
}
{
CodeableConcept theOrderedBy;
theOrderedBy = this.getOrderedBy();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderedBy", theOrderedBy), currentHashCode, theOrderedBy);
}
{
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);
}
{
List theSection;
theSection = (((this.section!= null)&&(!this.section.isEmpty()))?this.getSection():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "section", theSection), currentHashCode, theSection);
}
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);
{
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);
}
{
Narrative theText;
theText = this.getText();
strategy.appendField(locator, this, "text", buffer, theText);
}
{
Code theMode;
theMode = this.getMode();
strategy.appendField(locator, this, "mode", buffer, theMode);
}
{
CodeableConcept theOrderedBy;
theOrderedBy = this.getOrderedBy();
strategy.appendField(locator, this, "orderedBy", buffer, theOrderedBy);
}
{
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);
}
{
List theSection;
theSection = (((this.section!= null)&&(!this.section.isEmpty()))?this.getSection():null);
strategy.appendField(locator, this, "section", buffer, theSection);
}
return buffer;
}
}