All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.StructureMapRule Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
//
// 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.06 at 03:09:41 PM 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.Rule complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="StructureMap.Rule">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="name" type="{http://hl7.org/fhir}id"/>
 *         <element name="source" type="{http://hl7.org/fhir}StructureMap.Source" maxOccurs="unbounded"/>
 *         <element name="target" type="{http://hl7.org/fhir}StructureMap.Target" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="rule" type="{http://hl7.org/fhir}StructureMap.Rule" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="dependent" type="{http://hl7.org/fhir}StructureMap.Dependent" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="documentation" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "StructureMap.Rule", propOrder = { "name", "source", "target", "rule", "dependent", "documentation" }) public class StructureMapRule extends BackboneElement implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected Id name; @XmlElement(required = true) protected List source; protected List target; protected List rule; protected List dependent; protected org.hl7.fhir.String documentation; /** * Gets the value of the name property. * * @return * possible object is * {@link Id } * */ public Id getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link Id } * */ public void setName(Id value) { this.name = value; } /** * Gets the value of the source 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 source property. * *

* For example, to add a new item, do as follows: *

     *    getSource().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructureMapSource } * * */ public List getSource() { if (source == null) { source = new ArrayList(); } return this.source; } /** * Gets the value of the target 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 target property. * *

* For example, to add a new item, do as follows: *

     *    getTarget().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructureMapTarget } * * */ public List getTarget() { if (target == null) { target = new ArrayList(); } return this.target; } /** * Gets the value of the rule 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 rule property. * *

* For example, to add a new item, do as follows: *

     *    getRule().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructureMapRule } * * */ public List getRule() { if (rule == null) { rule = new ArrayList(); } return this.rule; } /** * Gets the value of the dependent 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 dependent property. * *

* For example, to add a new item, do as follows: *

     *    getDependent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructureMapDependent } * * */ public List getDependent() { if (dependent == null) { dependent = new ArrayList(); } return this.dependent; } /** * Gets the value of the documentation property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getDocumentation() { return documentation; } /** * Sets the value of the documentation property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setDocumentation(org.hl7.fhir.String value) { this.documentation = value; } public StructureMapRule withName(Id value) { setName(value); return this; } public StructureMapRule withSource(StructureMapSource... values) { if (values!= null) { for (StructureMapSource value: values) { getSource().add(value); } } return this; } public StructureMapRule withSource(Collection values) { if (values!= null) { getSource().addAll(values); } return this; } public StructureMapRule withTarget(StructureMapTarget... values) { if (values!= null) { for (StructureMapTarget value: values) { getTarget().add(value); } } return this; } public StructureMapRule withTarget(Collection values) { if (values!= null) { getTarget().addAll(values); } return this; } public StructureMapRule withRule(StructureMapRule... values) { if (values!= null) { for (StructureMapRule value: values) { getRule().add(value); } } return this; } public StructureMapRule withRule(Collection values) { if (values!= null) { getRule().addAll(values); } return this; } public StructureMapRule withDependent(StructureMapDependent... values) { if (values!= null) { for (StructureMapDependent value: values) { getDependent().add(value); } } return this; } public StructureMapRule withDependent(Collection values) { if (values!= null) { getDependent().addAll(values); } return this; } public StructureMapRule withDocumentation(org.hl7.fhir.String value) { setDocumentation(value); return this; } @Override public StructureMapRule withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public StructureMapRule withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public StructureMapRule withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public StructureMapRule withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public StructureMapRule 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 StructureMapRule that = ((StructureMapRule) object); { Id lhsName; lhsName = this.getName(); Id rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) { return false; } } { List lhsSource; lhsSource = (((this.source!= null)&&(!this.source.isEmpty()))?this.getSource():null); List rhsSource; rhsSource = (((that.source!= null)&&(!that.source.isEmpty()))?that.getSource():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, ((this.source!= null)&&(!this.source.isEmpty())), ((that.source!= null)&&(!that.source.isEmpty())))) { return false; } } { List lhsTarget; lhsTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); List rhsTarget; rhsTarget = (((that.target!= null)&&(!that.target.isEmpty()))?that.getTarget():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget, ((this.target!= null)&&(!this.target.isEmpty())), ((that.target!= null)&&(!that.target.isEmpty())))) { return false; } } { List lhsRule; lhsRule = (((this.rule!= null)&&(!this.rule.isEmpty()))?this.getRule():null); List rhsRule; rhsRule = (((that.rule!= null)&&(!that.rule.isEmpty()))?that.getRule():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "rule", lhsRule), LocatorUtils.property(thatLocator, "rule", rhsRule), lhsRule, rhsRule, ((this.rule!= null)&&(!this.rule.isEmpty())), ((that.rule!= null)&&(!that.rule.isEmpty())))) { return false; } } { List lhsDependent; lhsDependent = (((this.dependent!= null)&&(!this.dependent.isEmpty()))?this.getDependent():null); List rhsDependent; rhsDependent = (((that.dependent!= null)&&(!that.dependent.isEmpty()))?that.getDependent():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "dependent", lhsDependent), LocatorUtils.property(thatLocator, "dependent", rhsDependent), lhsDependent, rhsDependent, ((this.dependent!= null)&&(!this.dependent.isEmpty())), ((that.dependent!= null)&&(!that.dependent.isEmpty())))) { return false; } } { org.hl7.fhir.String lhsDocumentation; lhsDocumentation = this.getDocumentation(); org.hl7.fhir.String rhsDocumentation; rhsDocumentation = that.getDocumentation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "documentation", lhsDocumentation), LocatorUtils.property(thatLocator, "documentation", rhsDocumentation), lhsDocumentation, rhsDocumentation, (this.documentation!= null), (that.documentation!= 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); { Id theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null)); } { List theSource; theSource = (((this.source!= null)&&(!this.source.isEmpty()))?this.getSource():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, ((this.source!= null)&&(!this.source.isEmpty()))); } { List theTarget; theTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget, ((this.target!= null)&&(!this.target.isEmpty()))); } { List theRule; theRule = (((this.rule!= null)&&(!this.rule.isEmpty()))?this.getRule():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "rule", theRule), currentHashCode, theRule, ((this.rule!= null)&&(!this.rule.isEmpty()))); } { List theDependent; theDependent = (((this.dependent!= null)&&(!this.dependent.isEmpty()))?this.getDependent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dependent", theDependent), currentHashCode, theDependent, ((this.dependent!= null)&&(!this.dependent.isEmpty()))); } { org.hl7.fhir.String theDocumentation; theDocumentation = this.getDocumentation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentation", theDocumentation), currentHashCode, theDocumentation, (this.documentation!= 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); { Id theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null)); } { List theSource; theSource = (((this.source!= null)&&(!this.source.isEmpty()))?this.getSource():null); strategy.appendField(locator, this, "source", buffer, theSource, ((this.source!= null)&&(!this.source.isEmpty()))); } { List theTarget; theTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); strategy.appendField(locator, this, "target", buffer, theTarget, ((this.target!= null)&&(!this.target.isEmpty()))); } { List theRule; theRule = (((this.rule!= null)&&(!this.rule.isEmpty()))?this.getRule():null); strategy.appendField(locator, this, "rule", buffer, theRule, ((this.rule!= null)&&(!this.rule.isEmpty()))); } { List theDependent; theDependent = (((this.dependent!= null)&&(!this.dependent.isEmpty()))?this.getDependent():null); strategy.appendField(locator, this, "dependent", buffer, theDependent, ((this.dependent!= null)&&(!this.dependent.isEmpty()))); } { org.hl7.fhir.String theDocumentation; theDocumentation = this.getDocumentation(); strategy.appendField(locator, this, "documentation", buffer, theDocumentation, (this.documentation!= null)); } return buffer; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy