org.hl7.fhir.Library 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.XmlElement;
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 Library complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Library">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="moduleMetadata" type="{http://hl7.org/fhir}ModuleMetadata" minOccurs="0"/>
* <element name="model" type="{http://hl7.org/fhir}Library.Model" maxOccurs="unbounded" minOccurs="0"/>
* <element name="library" type="{http://hl7.org/fhir}Library.Library" maxOccurs="unbounded" minOccurs="0"/>
* <element name="codeSystem" type="{http://hl7.org/fhir}Library.CodeSystem" maxOccurs="unbounded" minOccurs="0"/>
* <element name="valueSet" type="{http://hl7.org/fhir}Library.ValueSet" maxOccurs="unbounded" minOccurs="0"/>
* <element name="parameter" type="{http://hl7.org/fhir}ParameterDefinition" maxOccurs="unbounded" minOccurs="0"/>
* <element name="dataRequirement" type="{http://hl7.org/fhir}DataRequirement" maxOccurs="unbounded" minOccurs="0"/>
* <element name="document" type="{http://hl7.org/fhir}Attachment"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Library", propOrder = {
"moduleMetadata",
"model",
"library",
"codeSystem",
"valueSet",
"parameter",
"dataRequirement",
"document"
})
public class Library
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected ModuleMetadata moduleMetadata;
protected List model;
protected List library;
protected List codeSystem;
protected List valueSet;
protected List parameter;
protected List dataRequirement;
@XmlElement(required = true)
protected Attachment document;
/**
* Gets the value of the moduleMetadata property.
*
* @return
* possible object is
* {@link ModuleMetadata }
*
*/
public ModuleMetadata getModuleMetadata() {
return moduleMetadata;
}
/**
* Sets the value of the moduleMetadata property.
*
* @param value
* allowed object is
* {@link ModuleMetadata }
*
*/
public void setModuleMetadata(ModuleMetadata value) {
this.moduleMetadata = 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 LibraryModel }
*
*
*/
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 LibraryLibrary }
*
*
*/
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 LibraryCodeSystem }
*
*
*/
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 LibraryValueSet }
*
*
*/
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 ParameterDefinition }
*
*
*/
public List getParameter() {
if (parameter == null) {
parameter = new ArrayList();
}
return this.parameter;
}
/**
* Gets the value of the dataRequirement 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 dataRequirement property.
*
*
* For example, to add a new item, do as follows:
*
* getDataRequirement().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DataRequirement }
*
*
*/
public List getDataRequirement() {
if (dataRequirement == null) {
dataRequirement = new ArrayList();
}
return this.dataRequirement;
}
/**
* Gets the value of the document property.
*
* @return
* possible object is
* {@link Attachment }
*
*/
public Attachment getDocument() {
return document;
}
/**
* Sets the value of the document property.
*
* @param value
* allowed object is
* {@link Attachment }
*
*/
public void setDocument(Attachment value) {
this.document = value;
}
public Library withModuleMetadata(ModuleMetadata value) {
setModuleMetadata(value);
return this;
}
public Library withModel(LibraryModel... values) {
if (values!= null) {
for (LibraryModel value: values) {
getModel().add(value);
}
}
return this;
}
public Library withModel(Collection values) {
if (values!= null) {
getModel().addAll(values);
}
return this;
}
public Library withLibrary(LibraryLibrary... values) {
if (values!= null) {
for (LibraryLibrary value: values) {
getLibrary().add(value);
}
}
return this;
}
public Library withLibrary(Collection values) {
if (values!= null) {
getLibrary().addAll(values);
}
return this;
}
public Library withCodeSystem(LibraryCodeSystem... values) {
if (values!= null) {
for (LibraryCodeSystem value: values) {
getCodeSystem().add(value);
}
}
return this;
}
public Library withCodeSystem(Collection values) {
if (values!= null) {
getCodeSystem().addAll(values);
}
return this;
}
public Library withValueSet(LibraryValueSet... values) {
if (values!= null) {
for (LibraryValueSet value: values) {
getValueSet().add(value);
}
}
return this;
}
public Library withValueSet(Collection values) {
if (values!= null) {
getValueSet().addAll(values);
}
return this;
}
public Library withParameter(ParameterDefinition... values) {
if (values!= null) {
for (ParameterDefinition value: values) {
getParameter().add(value);
}
}
return this;
}
public Library withParameter(Collection values) {
if (values!= null) {
getParameter().addAll(values);
}
return this;
}
public Library withDataRequirement(DataRequirement... values) {
if (values!= null) {
for (DataRequirement value: values) {
getDataRequirement().add(value);
}
}
return this;
}
public Library withDataRequirement(Collection values) {
if (values!= null) {
getDataRequirement().addAll(values);
}
return this;
}
public Library withDocument(Attachment value) {
setDocument(value);
return this;
}
@Override
public Library withText(Narrative value) {
setText(value);
return this;
}
@Override
public Library withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public Library withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public Library withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Library withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Library withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public Library withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public Library withId(Id value) {
setId(value);
return this;
}
@Override
public Library withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public Library withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public Library 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 Library that = ((Library) object);
{
ModuleMetadata lhsModuleMetadata;
lhsModuleMetadata = this.getModuleMetadata();
ModuleMetadata rhsModuleMetadata;
rhsModuleMetadata = that.getModuleMetadata();
if (!strategy.equals(LocatorUtils.property(thisLocator, "moduleMetadata", lhsModuleMetadata), LocatorUtils.property(thatLocator, "moduleMetadata", rhsModuleMetadata), lhsModuleMetadata, rhsModuleMetadata, (this.moduleMetadata!= null), (that.moduleMetadata!= 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 lhsDataRequirement;
lhsDataRequirement = (((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty()))?this.getDataRequirement():null);
List rhsDataRequirement;
rhsDataRequirement = (((that.dataRequirement!= null)&&(!that.dataRequirement.isEmpty()))?that.getDataRequirement():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "dataRequirement", lhsDataRequirement), LocatorUtils.property(thatLocator, "dataRequirement", rhsDataRequirement), lhsDataRequirement, rhsDataRequirement, ((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty())), ((that.dataRequirement!= null)&&(!that.dataRequirement.isEmpty())))) {
return false;
}
}
{
Attachment lhsDocument;
lhsDocument = this.getDocument();
Attachment rhsDocument;
rhsDocument = that.getDocument();
if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument, (this.document!= null), (that.document!= null))) {
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);
{
ModuleMetadata theModuleMetadata;
theModuleMetadata = this.getModuleMetadata();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "moduleMetadata", theModuleMetadata), currentHashCode, theModuleMetadata, (this.moduleMetadata!= 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 theDataRequirement;
theDataRequirement = (((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty()))?this.getDataRequirement():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dataRequirement", theDataRequirement), currentHashCode, theDataRequirement, ((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty())));
}
{
Attachment theDocument;
theDocument = this.getDocument();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument, (this.document!= null));
}
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);
{
ModuleMetadata theModuleMetadata;
theModuleMetadata = this.getModuleMetadata();
strategy.appendField(locator, this, "moduleMetadata", buffer, theModuleMetadata, (this.moduleMetadata!= 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 theDataRequirement;
theDataRequirement = (((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty()))?this.getDataRequirement():null);
strategy.appendField(locator, this, "dataRequirement", buffer, theDataRequirement, ((this.dataRequirement!= null)&&(!this.dataRequirement.isEmpty())));
}
{
Attachment theDocument;
theDocument = this.getDocument();
strategy.appendField(locator, this, "document", buffer, theDocument, (this.document!= null));
}
return buffer;
}
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 setDataRequirement(List value) {
this.dataRequirement = value;
}
}