org.hl7.fhir.ModuleDefinition 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: 2024.08.16 at 09:36:55 AM MDT
//
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;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* Java class for ModuleDefinition complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="ModuleDefinition">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <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="model" type="{http://hl7.org/fhir}ModuleDefinition.Model" maxOccurs="unbounded" minOccurs="0"/>
* <element name="library" type="{http://hl7.org/fhir}ModuleDefinition.Library" maxOccurs="unbounded" minOccurs="0"/>
* <element name="codeSystem" type="{http://hl7.org/fhir}ModuleDefinition.CodeSystem" maxOccurs="unbounded" minOccurs="0"/>
* <element name="valueSet" type="{http://hl7.org/fhir}ModuleDefinition.ValueSet" maxOccurs="unbounded" minOccurs="0"/>
* <element name="parameter" type="{http://hl7.org/fhir}ModuleDefinition.Parameter" maxOccurs="unbounded" minOccurs="0"/>
* <element name="data" type="{http://hl7.org/fhir}ModuleDefinition.Data" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ModuleDefinition", propOrder = {
"identifier",
"version",
"model",
"library",
"codeSystem",
"valueSet",
"parameter",
"data"
})
public class ModuleDefinition
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected List identifier;
protected org.hl7.fhir.String version;
protected List model;
protected List library;
protected List codeSystem;
protected List valueSet;
protected List parameter;
protected List data;
/**
* 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 Jakarta XML Binding 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 model 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 model property.
*
*
* For example, to add a new item, do as follows:
*
* getModel().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionModel }
*
*
*/
public List getModel() {
if (model == null) {
model = new ArrayList();
}
return this.model;
}
/**
* Gets the value of the library 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 library property.
*
*
* For example, to add a new item, do as follows:
*
* getLibrary().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionLibrary }
*
*
*/
public List getLibrary() {
if (library == null) {
library = new ArrayList();
}
return this.library;
}
/**
* Gets the value of the codeSystem 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 codeSystem property.
*
*
* For example, to add a new item, do as follows:
*
* getCodeSystem().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionCodeSystem }
*
*
*/
public List getCodeSystem() {
if (codeSystem == null) {
codeSystem = new ArrayList();
}
return this.codeSystem;
}
/**
* Gets the value of the valueSet 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 valueSet property.
*
*
* For example, to add a new item, do as follows:
*
* getValueSet().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionValueSet }
*
*
*/
public List getValueSet() {
if (valueSet == null) {
valueSet = new ArrayList();
}
return this.valueSet;
}
/**
* Gets the value of the parameter 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 parameter property.
*
*
* For example, to add a new item, do as follows:
*
* getParameter().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionParameter }
*
*
*/
public List getParameter() {
if (parameter == null) {
parameter = new ArrayList();
}
return this.parameter;
}
/**
* Gets the value of the data 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 data property.
*
*
* For example, to add a new item, do as follows:
*
* getData().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ModuleDefinitionData }
*
*
*/
public List getData() {
if (data == null) {
data = new ArrayList();
}
return this.data;
}
public ModuleDefinition withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public ModuleDefinition withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public ModuleDefinition withVersion(org.hl7.fhir.String value) {
setVersion(value);
return this;
}
public ModuleDefinition withModel(ModuleDefinitionModel... values) {
if (values!= null) {
for (ModuleDefinitionModel value: values) {
getModel().add(value);
}
}
return this;
}
public ModuleDefinition withModel(Collection values) {
if (values!= null) {
getModel().addAll(values);
}
return this;
}
public ModuleDefinition withLibrary(ModuleDefinitionLibrary... values) {
if (values!= null) {
for (ModuleDefinitionLibrary value: values) {
getLibrary().add(value);
}
}
return this;
}
public ModuleDefinition withLibrary(Collection values) {
if (values!= null) {
getLibrary().addAll(values);
}
return this;
}
public ModuleDefinition withCodeSystem(ModuleDefinitionCodeSystem... values) {
if (values!= null) {
for (ModuleDefinitionCodeSystem value: values) {
getCodeSystem().add(value);
}
}
return this;
}
public ModuleDefinition withCodeSystem(Collection values) {
if (values!= null) {
getCodeSystem().addAll(values);
}
return this;
}
public ModuleDefinition withValueSet(ModuleDefinitionValueSet... values) {
if (values!= null) {
for (ModuleDefinitionValueSet value: values) {
getValueSet().add(value);
}
}
return this;
}
public ModuleDefinition withValueSet(Collection values) {
if (values!= null) {
getValueSet().addAll(values);
}
return this;
}
public ModuleDefinition withParameter(ModuleDefinitionParameter... values) {
if (values!= null) {
for (ModuleDefinitionParameter value: values) {
getParameter().add(value);
}
}
return this;
}
public ModuleDefinition withParameter(Collection values) {
if (values!= null) {
getParameter().addAll(values);
}
return this;
}
public ModuleDefinition withData(ModuleDefinitionData... values) {
if (values!= null) {
for (ModuleDefinitionData value: values) {
getData().add(value);
}
}
return this;
}
public ModuleDefinition withData(Collection values) {
if (values!= null) {
getData().addAll(values);
}
return this;
}
@Override
public ModuleDefinition withText(Narrative value) {
setText(value);
return this;
}
@Override
public ModuleDefinition withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public ModuleDefinition withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public ModuleDefinition withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public ModuleDefinition withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public ModuleDefinition withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public ModuleDefinition withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public ModuleDefinition withId(Id value) {
setId(value);
return this;
}
@Override
public ModuleDefinition withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public ModuleDefinition withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public ModuleDefinition withLanguage(Code value) {
setLanguage(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 ModuleDefinition that = ((ModuleDefinition) object);
{
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, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) {
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, (this.version!= null), (that.version!= null))) {
return false;
}
}
{
List lhsModel;
lhsModel = (((this.model!= null)&&(!this.model.isEmpty()))?this.getModel():null);
List rhsModel;
rhsModel = (((that.model!= null)&&(!that.model.isEmpty()))?that.getModel():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "model", lhsModel), LocatorUtils.property(thatLocator, "model", rhsModel), lhsModel, rhsModel, ((this.model!= null)&&(!this.model.isEmpty())), ((that.model!= null)&&(!that.model.isEmpty())))) {
return false;
}
}
{
List lhsLibrary;
lhsLibrary = (((this.library!= null)&&(!this.library.isEmpty()))?this.getLibrary():null);
List rhsLibrary;
rhsLibrary = (((that.library!= null)&&(!that.library.isEmpty()))?that.getLibrary():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "library", lhsLibrary), LocatorUtils.property(thatLocator, "library", rhsLibrary), lhsLibrary, rhsLibrary, ((this.library!= null)&&(!this.library.isEmpty())), ((that.library!= null)&&(!that.library.isEmpty())))) {
return false;
}
}
{
List lhsCodeSystem;
lhsCodeSystem = (((this.codeSystem!= null)&&(!this.codeSystem.isEmpty()))?this.getCodeSystem():null);
List rhsCodeSystem;
rhsCodeSystem = (((that.codeSystem!= null)&&(!that.codeSystem.isEmpty()))?that.getCodeSystem():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "codeSystem", lhsCodeSystem), LocatorUtils.property(thatLocator, "codeSystem", rhsCodeSystem), lhsCodeSystem, rhsCodeSystem, ((this.codeSystem!= null)&&(!this.codeSystem.isEmpty())), ((that.codeSystem!= null)&&(!that.codeSystem.isEmpty())))) {
return false;
}
}
{
List lhsValueSet;
lhsValueSet = (((this.valueSet!= null)&&(!this.valueSet.isEmpty()))?this.getValueSet():null);
List rhsValueSet;
rhsValueSet = (((that.valueSet!= null)&&(!that.valueSet.isEmpty()))?that.getValueSet():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "valueSet", lhsValueSet), LocatorUtils.property(thatLocator, "valueSet", rhsValueSet), lhsValueSet, rhsValueSet, ((this.valueSet!= null)&&(!this.valueSet.isEmpty())), ((that.valueSet!= null)&&(!that.valueSet.isEmpty())))) {
return false;
}
}
{
List lhsParameter;
lhsParameter = (((this.parameter!= null)&&(!this.parameter.isEmpty()))?this.getParameter():null);
List rhsParameter;
rhsParameter = (((that.parameter!= null)&&(!that.parameter.isEmpty()))?that.getParameter():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "parameter", lhsParameter), LocatorUtils.property(thatLocator, "parameter", rhsParameter), lhsParameter, rhsParameter, ((this.parameter!= null)&&(!this.parameter.isEmpty())), ((that.parameter!= null)&&(!that.parameter.isEmpty())))) {
return false;
}
}
{
List lhsData;
lhsData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null);
List rhsData;
rhsData = (((that.data!= null)&&(!that.data.isEmpty()))?that.getData():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "data", lhsData), LocatorUtils.property(thatLocator, "data", rhsData), lhsData, rhsData, ((this.data!= null)&&(!this.data.isEmpty())), ((that.data!= null)&&(!that.data.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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
org.hl7.fhir.String theVersion;
theVersion = this.getVersion();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion, (this.version!= null));
}
{
List theModel;
theModel = (((this.model!= null)&&(!this.model.isEmpty()))?this.getModel():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "model", theModel), currentHashCode, theModel, ((this.model!= null)&&(!this.model.isEmpty())));
}
{
List theLibrary;
theLibrary = (((this.library!= null)&&(!this.library.isEmpty()))?this.getLibrary():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "library", theLibrary), currentHashCode, theLibrary, ((this.library!= null)&&(!this.library.isEmpty())));
}
{
List theCodeSystem;
theCodeSystem = (((this.codeSystem!= null)&&(!this.codeSystem.isEmpty()))?this.getCodeSystem():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "codeSystem", theCodeSystem), currentHashCode, theCodeSystem, ((this.codeSystem!= null)&&(!this.codeSystem.isEmpty())));
}
{
List theValueSet;
theValueSet = (((this.valueSet!= null)&&(!this.valueSet.isEmpty()))?this.getValueSet():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueSet", theValueSet), currentHashCode, theValueSet, ((this.valueSet!= null)&&(!this.valueSet.isEmpty())));
}
{
List theParameter;
theParameter = (((this.parameter!= null)&&(!this.parameter.isEmpty()))?this.getParameter():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parameter", theParameter), currentHashCode, theParameter, ((this.parameter!= null)&&(!this.parameter.isEmpty())));
}
{
List theData;
theData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "data", theData), currentHashCode, theData, ((this.data!= null)&&(!this.data.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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
org.hl7.fhir.String theVersion;
theVersion = this.getVersion();
strategy.appendField(locator, this, "version", buffer, theVersion, (this.version!= null));
}
{
List theModel;
theModel = (((this.model!= null)&&(!this.model.isEmpty()))?this.getModel():null);
strategy.appendField(locator, this, "model", buffer, theModel, ((this.model!= null)&&(!this.model.isEmpty())));
}
{
List theLibrary;
theLibrary = (((this.library!= null)&&(!this.library.isEmpty()))?this.getLibrary():null);
strategy.appendField(locator, this, "library", buffer, theLibrary, ((this.library!= null)&&(!this.library.isEmpty())));
}
{
List theCodeSystem;
theCodeSystem = (((this.codeSystem!= null)&&(!this.codeSystem.isEmpty()))?this.getCodeSystem():null);
strategy.appendField(locator, this, "codeSystem", buffer, theCodeSystem, ((this.codeSystem!= null)&&(!this.codeSystem.isEmpty())));
}
{
List theValueSet;
theValueSet = (((this.valueSet!= null)&&(!this.valueSet.isEmpty()))?this.getValueSet():null);
strategy.appendField(locator, this, "valueSet", buffer, theValueSet, ((this.valueSet!= null)&&(!this.valueSet.isEmpty())));
}
{
List theParameter;
theParameter = (((this.parameter!= null)&&(!this.parameter.isEmpty()))?this.getParameter():null);
strategy.appendField(locator, this, "parameter", buffer, theParameter, ((this.parameter!= null)&&(!this.parameter.isEmpty())));
}
{
List theData;
theData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null);
strategy.appendField(locator, this, "data", buffer, theData, ((this.data!= null)&&(!this.data.isEmpty())));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
public void setModel(List value) {
this.model = value;
}
public void setLibrary(List value) {
this.library = value;
}
public void setCodeSystem(List value) {
this.codeSystem = value;
}
public void setValueSet(List value) {
this.valueSet = value;
}
public void setParameter(List value) {
this.parameter = value;
}
public void setData(List value) {
this.data = value;
}
}