org.hl7.fhir.CompositionSection Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2023.12.08 at 08:47:56 AM MST
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
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.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
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 Equals2, HashCode2, ToString2
{
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 Jakarta XML Binding 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 Jakarta XML Binding 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;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
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, (this.title!= null), (that.title!= null))) {
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, (this.code!= null), (that.code!= null))) {
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, (this.text!= null), (that.text!= null))) {
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, (this.mode!= null), (that.mode!= null))) {
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, (this.orderedBy!= null), (that.orderedBy!= null))) {
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, ((this.entry!= null)&&(!this.entry.isEmpty())), ((that.entry!= null)&&(!that.entry.isEmpty())))) {
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, (this.emptyReason!= null), (that.emptyReason!= null))) {
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, ((this.section!= null)&&(!this.section.isEmpty())), ((that.section!= null)&&(!that.section.isEmpty())))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 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, (this.title!= null));
}
{
CodeableConcept theCode;
theCode = this.getCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode, (this.code!= null));
}
{
Narrative theText;
theText = this.getText();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "text", theText), currentHashCode, theText, (this.text!= null));
}
{
Code theMode;
theMode = this.getMode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode, (this.mode!= null));
}
{
CodeableConcept theOrderedBy;
theOrderedBy = this.getOrderedBy();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderedBy", theOrderedBy), currentHashCode, theOrderedBy, (this.orderedBy!= null));
}
{
List theEntry;
theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entry", theEntry), currentHashCode, theEntry, ((this.entry!= null)&&(!this.entry.isEmpty())));
}
{
CodeableConcept theEmptyReason;
theEmptyReason = this.getEmptyReason();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "emptyReason", theEmptyReason), currentHashCode, theEmptyReason, (this.emptyReason!= null));
}
{
List theSection;
theSection = (((this.section!= null)&&(!this.section.isEmpty()))?this.getSection():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "section", theSection), currentHashCode, theSection, ((this.section!= null)&&(!this.section.isEmpty())));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
org.hl7.fhir.String theTitle;
theTitle = this.getTitle();
strategy.appendField(locator, this, "title", buffer, theTitle, (this.title!= null));
}
{
CodeableConcept theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null));
}
{
Narrative theText;
theText = this.getText();
strategy.appendField(locator, this, "text", buffer, theText, (this.text!= null));
}
{
Code theMode;
theMode = this.getMode();
strategy.appendField(locator, this, "mode", buffer, theMode, (this.mode!= null));
}
{
CodeableConcept theOrderedBy;
theOrderedBy = this.getOrderedBy();
strategy.appendField(locator, this, "orderedBy", buffer, theOrderedBy, (this.orderedBy!= null));
}
{
List theEntry;
theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null);
strategy.appendField(locator, this, "entry", buffer, theEntry, ((this.entry!= null)&&(!this.entry.isEmpty())));
}
{
CodeableConcept theEmptyReason;
theEmptyReason = this.getEmptyReason();
strategy.appendField(locator, this, "emptyReason", buffer, theEmptyReason, (this.emptyReason!= null));
}
{
List theSection;
theSection = (((this.section!= null)&&(!this.section.isEmpty()))?this.getSection():null);
strategy.appendField(locator, this, "section", buffer, theSection, ((this.section!= null)&&(!this.section.isEmpty())));
}
return buffer;
}
}