org.hl7.fhir.StructureMapTarget 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.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;
/**
* A Map of relationships between 2 structures that can be used to transform data.
*
* Java class for StructureMap.Target complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="StructureMap.Target">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="context" type="{http://hl7.org/fhir}id"/>
* <element name="contextType" type="{http://hl7.org/fhir}StructureMapContextType"/>
* <element name="element" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="variable" type="{http://hl7.org/fhir}id" minOccurs="0"/>
* <element name="listMode" type="{http://hl7.org/fhir}StructureMapListMode" maxOccurs="unbounded" minOccurs="0"/>
* <element name="listRuleId" type="{http://hl7.org/fhir}id" minOccurs="0"/>
* <element name="transform" type="{http://hl7.org/fhir}StructureMapTransform" minOccurs="0"/>
* <element name="parameter" type="{http://hl7.org/fhir}StructureMap.Parameter" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StructureMap.Target", propOrder = {
"context",
"contextType",
"element",
"variable",
"listMode",
"listRuleId",
"transform",
"parameter"
})
public class StructureMapTarget
extends BackboneElement
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected Id context;
@XmlElement(required = true)
protected StructureMapContextType contextType;
protected org.hl7.fhir.String element;
protected Id variable;
protected List listMode;
protected Id listRuleId;
protected StructureMapTransform transform;
protected List parameter;
/**
* Gets the value of the context property.
*
* @return
* possible object is
* {@link Id }
*
*/
public Id getContext() {
return context;
}
/**
* Sets the value of the context property.
*
* @param value
* allowed object is
* {@link Id }
*
*/
public void setContext(Id value) {
this.context = value;
}
/**
* Gets the value of the contextType property.
*
* @return
* possible object is
* {@link StructureMapContextType }
*
*/
public StructureMapContextType getContextType() {
return contextType;
}
/**
* Sets the value of the contextType property.
*
* @param value
* allowed object is
* {@link StructureMapContextType }
*
*/
public void setContextType(StructureMapContextType value) {
this.contextType = value;
}
/**
* Gets the value of the element property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getElement() {
return element;
}
/**
* Sets the value of the element property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setElement(org.hl7.fhir.String value) {
this.element = value;
}
/**
* Gets the value of the variable property.
*
* @return
* possible object is
* {@link Id }
*
*/
public Id getVariable() {
return variable;
}
/**
* Sets the value of the variable property.
*
* @param value
* allowed object is
* {@link Id }
*
*/
public void setVariable(Id value) {
this.variable = value;
}
/**
* Gets the value of the listMode 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 listMode property.
*
*
* For example, to add a new item, do as follows:
*
* getListMode().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link StructureMapListMode }
*
*
*/
public List getListMode() {
if (listMode == null) {
listMode = new ArrayList();
}
return this.listMode;
}
/**
* Gets the value of the listRuleId property.
*
* @return
* possible object is
* {@link Id }
*
*/
public Id getListRuleId() {
return listRuleId;
}
/**
* Sets the value of the listRuleId property.
*
* @param value
* allowed object is
* {@link Id }
*
*/
public void setListRuleId(Id value) {
this.listRuleId = value;
}
/**
* Gets the value of the transform property.
*
* @return
* possible object is
* {@link StructureMapTransform }
*
*/
public StructureMapTransform getTransform() {
return transform;
}
/**
* Sets the value of the transform property.
*
* @param value
* allowed object is
* {@link StructureMapTransform }
*
*/
public void setTransform(StructureMapTransform value) {
this.transform = value;
}
/**
* 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 StructureMapParameter }
*
*
*/
public List getParameter() {
if (parameter == null) {
parameter = new ArrayList();
}
return this.parameter;
}
public StructureMapTarget withContext(Id value) {
setContext(value);
return this;
}
public StructureMapTarget withContextType(StructureMapContextType value) {
setContextType(value);
return this;
}
public StructureMapTarget withElement(org.hl7.fhir.String value) {
setElement(value);
return this;
}
public StructureMapTarget withVariable(Id value) {
setVariable(value);
return this;
}
public StructureMapTarget withListMode(StructureMapListMode... values) {
if (values!= null) {
for (StructureMapListMode value: values) {
getListMode().add(value);
}
}
return this;
}
public StructureMapTarget withListMode(Collection values) {
if (values!= null) {
getListMode().addAll(values);
}
return this;
}
public StructureMapTarget withListRuleId(Id value) {
setListRuleId(value);
return this;
}
public StructureMapTarget withTransform(StructureMapTransform value) {
setTransform(value);
return this;
}
public StructureMapTarget withParameter(StructureMapParameter... values) {
if (values!= null) {
for (StructureMapParameter value: values) {
getParameter().add(value);
}
}
return this;
}
public StructureMapTarget withParameter(Collection values) {
if (values!= null) {
getParameter().addAll(values);
}
return this;
}
@Override
public StructureMapTarget withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public StructureMapTarget withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public StructureMapTarget withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public StructureMapTarget withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public StructureMapTarget 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 StructureMapTarget that = ((StructureMapTarget) object);
{
Id lhsContext;
lhsContext = this.getContext();
Id rhsContext;
rhsContext = that.getContext();
if (!strategy.equals(LocatorUtils.property(thisLocator, "context", lhsContext), LocatorUtils.property(thatLocator, "context", rhsContext), lhsContext, rhsContext, (this.context!= null), (that.context!= null))) {
return false;
}
}
{
StructureMapContextType lhsContextType;
lhsContextType = this.getContextType();
StructureMapContextType rhsContextType;
rhsContextType = that.getContextType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "contextType", lhsContextType), LocatorUtils.property(thatLocator, "contextType", rhsContextType), lhsContextType, rhsContextType, (this.contextType!= null), (that.contextType!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsElement;
lhsElement = this.getElement();
org.hl7.fhir.String rhsElement;
rhsElement = that.getElement();
if (!strategy.equals(LocatorUtils.property(thisLocator, "element", lhsElement), LocatorUtils.property(thatLocator, "element", rhsElement), lhsElement, rhsElement, (this.element!= null), (that.element!= null))) {
return false;
}
}
{
Id lhsVariable;
lhsVariable = this.getVariable();
Id rhsVariable;
rhsVariable = that.getVariable();
if (!strategy.equals(LocatorUtils.property(thisLocator, "variable", lhsVariable), LocatorUtils.property(thatLocator, "variable", rhsVariable), lhsVariable, rhsVariable, (this.variable!= null), (that.variable!= null))) {
return false;
}
}
{
List lhsListMode;
lhsListMode = (((this.listMode!= null)&&(!this.listMode.isEmpty()))?this.getListMode():null);
List rhsListMode;
rhsListMode = (((that.listMode!= null)&&(!that.listMode.isEmpty()))?that.getListMode():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "listMode", lhsListMode), LocatorUtils.property(thatLocator, "listMode", rhsListMode), lhsListMode, rhsListMode, ((this.listMode!= null)&&(!this.listMode.isEmpty())), ((that.listMode!= null)&&(!that.listMode.isEmpty())))) {
return false;
}
}
{
Id lhsListRuleId;
lhsListRuleId = this.getListRuleId();
Id rhsListRuleId;
rhsListRuleId = that.getListRuleId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "listRuleId", lhsListRuleId), LocatorUtils.property(thatLocator, "listRuleId", rhsListRuleId), lhsListRuleId, rhsListRuleId, (this.listRuleId!= null), (that.listRuleId!= null))) {
return false;
}
}
{
StructureMapTransform lhsTransform;
lhsTransform = this.getTransform();
StructureMapTransform rhsTransform;
rhsTransform = that.getTransform();
if (!strategy.equals(LocatorUtils.property(thisLocator, "transform", lhsTransform), LocatorUtils.property(thatLocator, "transform", rhsTransform), lhsTransform, rhsTransform, (this.transform!= null), (that.transform!= null))) {
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;
}
}
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);
{
Id theContext;
theContext = this.getContext();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "context", theContext), currentHashCode, theContext, (this.context!= null));
}
{
StructureMapContextType theContextType;
theContextType = this.getContextType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contextType", theContextType), currentHashCode, theContextType, (this.contextType!= null));
}
{
org.hl7.fhir.String theElement;
theElement = this.getElement();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "element", theElement), currentHashCode, theElement, (this.element!= null));
}
{
Id theVariable;
theVariable = this.getVariable();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "variable", theVariable), currentHashCode, theVariable, (this.variable!= null));
}
{
List theListMode;
theListMode = (((this.listMode!= null)&&(!this.listMode.isEmpty()))?this.getListMode():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "listMode", theListMode), currentHashCode, theListMode, ((this.listMode!= null)&&(!this.listMode.isEmpty())));
}
{
Id theListRuleId;
theListRuleId = this.getListRuleId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "listRuleId", theListRuleId), currentHashCode, theListRuleId, (this.listRuleId!= null));
}
{
StructureMapTransform theTransform;
theTransform = this.getTransform();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "transform", theTransform), currentHashCode, theTransform, (this.transform!= null));
}
{
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())));
}
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);
{
Id theContext;
theContext = this.getContext();
strategy.appendField(locator, this, "context", buffer, theContext, (this.context!= null));
}
{
StructureMapContextType theContextType;
theContextType = this.getContextType();
strategy.appendField(locator, this, "contextType", buffer, theContextType, (this.contextType!= null));
}
{
org.hl7.fhir.String theElement;
theElement = this.getElement();
strategy.appendField(locator, this, "element", buffer, theElement, (this.element!= null));
}
{
Id theVariable;
theVariable = this.getVariable();
strategy.appendField(locator, this, "variable", buffer, theVariable, (this.variable!= null));
}
{
List theListMode;
theListMode = (((this.listMode!= null)&&(!this.listMode.isEmpty()))?this.getListMode():null);
strategy.appendField(locator, this, "listMode", buffer, theListMode, ((this.listMode!= null)&&(!this.listMode.isEmpty())));
}
{
Id theListRuleId;
theListRuleId = this.getListRuleId();
strategy.appendField(locator, this, "listRuleId", buffer, theListRuleId, (this.listRuleId!= null));
}
{
StructureMapTransform theTransform;
theTransform = this.getTransform();
strategy.appendField(locator, this, "transform", buffer, theTransform, (this.transform!= null));
}
{
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())));
}
return buffer;
}
}