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

org.cqframework.cql.elm.execution.Element Maven / Gradle / Ivy

The newest version!
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0 
// See https://javaee.github.io/jaxb-v2/ 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2022.01.10 at 12:41:52 PM MST 
//


package org.cqframework.cql.elm.execution;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
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;
import org.opencds.cqf.cql.engine.elm.execution.Executable;


/**
 * The Element type defines the abstract base type for all library elements in ELM.
 * 
 * 

Java class for Element complex type. * *

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

 * <complexType name="Element">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="annotation" type="{http://www.w3.org/2001/XMLSchema}anyType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="resultTypeSpecifier" type="{urn:hl7-org:elm:r1}TypeSpecifier" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="localId" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="locator" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="resultTypeName" type="{http://www.w3.org/2001/XMLSchema}QName" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Element", namespace = "urn:hl7-org:elm:r1", propOrder = { "annotation", "resultTypeSpecifier" }) @XmlSeeAlso({ Library.class, TupleElementDefinition.class, TypeSpecifier.class, ExpressionDef.class, ParameterDef.class, OperandDef.class, CaseItem.class, LetClause.class, AliasedQuerySource.class, SortByItem.class, SortClause.class, ReturnClause.class, CodeFilterElement.class, DateFilterElement.class, OtherFilterElement.class, IncludeElement.class, CodeSystemDef.class, ValueSetDef.class, CodeDef.class, ConceptDef.class, Expression.class, UsingDef.class, IncludeDef.class }) @SuppressWarnings({ "all" }) public abstract class Element extends Executable implements Equals2, HashCode2, ToString2 { @XmlElement(namespace = "urn:hl7-org:elm:r1") protected List annotation; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected TypeSpecifier resultTypeSpecifier; @XmlAttribute(name = "localId") protected String localId; @XmlAttribute(name = "locator") protected String locator; @XmlAttribute(name = "resultTypeName") protected QName resultTypeName; /** * Gets the value of the annotation 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 JAXB object. * This is why there is not a set method for the annotation property. * *

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

     *    getAnnotation().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List getAnnotation() { if (annotation == null) { annotation = new ArrayList(); } return this.annotation; } /** * Gets the value of the resultTypeSpecifier property. * * @return * possible object is * {@link TypeSpecifier } * */ public TypeSpecifier getResultTypeSpecifier() { return resultTypeSpecifier; } /** * Sets the value of the resultTypeSpecifier property. * * @param value * allowed object is * {@link TypeSpecifier } * */ public void setResultTypeSpecifier(TypeSpecifier value) { this.resultTypeSpecifier = value; } /** * Gets the value of the localId property. * * @return * possible object is * {@link String } * */ public String getLocalId() { return localId; } /** * Sets the value of the localId property. * * @param value * allowed object is * {@link String } * */ public void setLocalId(String value) { this.localId = value; } /** * Gets the value of the locator property. * * @return * possible object is * {@link String } * */ public String getLocator() { return locator; } /** * Sets the value of the locator property. * * @param value * allowed object is * {@link String } * */ public void setLocator(String value) { this.locator = value; } /** * Gets the value of the resultTypeName property. * * @return * possible object is * {@link QName } * */ public QName getResultTypeName() { return resultTypeName; } /** * Sets the value of the resultTypeName property. * * @param value * allowed object is * {@link QName } * */ public void setResultTypeName(QName value) { this.resultTypeName = value; } public Element withAnnotation(Object... values) { if (values!= null) { for (Object value: values) { getAnnotation().add(value); } } return this; } public Element withAnnotation(Collection values) { if (values!= null) { getAnnotation().addAll(values); } return this; } public Element withResultTypeSpecifier(TypeSpecifier value) { setResultTypeSpecifier(value); return this; } public Element withLocalId(String value) { setLocalId(value); return this; } public Element withLocator(String value) { setLocator(value); return this; } public Element withResultTypeName(QName value) { setResultTypeName(value); return this; } 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; } final Element that = ((Element) object); { List lhsAnnotation; lhsAnnotation = (((this.annotation!= null)&&(!this.annotation.isEmpty()))?this.getAnnotation():null); List rhsAnnotation; rhsAnnotation = (((that.annotation!= null)&&(!that.annotation.isEmpty()))?that.getAnnotation():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "annotation", lhsAnnotation), LocatorUtils.property(thatLocator, "annotation", rhsAnnotation), lhsAnnotation, rhsAnnotation, ((this.annotation!= null)&&(!this.annotation.isEmpty())), ((that.annotation!= null)&&(!that.annotation.isEmpty())))) { return false; } } { TypeSpecifier lhsResultTypeSpecifier; lhsResultTypeSpecifier = this.getResultTypeSpecifier(); TypeSpecifier rhsResultTypeSpecifier; rhsResultTypeSpecifier = that.getResultTypeSpecifier(); if (!strategy.equals(LocatorUtils.property(thisLocator, "resultTypeSpecifier", lhsResultTypeSpecifier), LocatorUtils.property(thatLocator, "resultTypeSpecifier", rhsResultTypeSpecifier), lhsResultTypeSpecifier, rhsResultTypeSpecifier, (this.resultTypeSpecifier!= null), (that.resultTypeSpecifier!= null))) { return false; } } { String lhsLocalId; lhsLocalId = this.getLocalId(); String rhsLocalId; rhsLocalId = that.getLocalId(); if (!strategy.equals(LocatorUtils.property(thisLocator, "localId", lhsLocalId), LocatorUtils.property(thatLocator, "localId", rhsLocalId), lhsLocalId, rhsLocalId, (this.localId!= null), (that.localId!= null))) { return false; } } { String lhsLocator; lhsLocator = this.getLocator(); String rhsLocator; rhsLocator = that.getLocator(); if (!strategy.equals(LocatorUtils.property(thisLocator, "locator", lhsLocator), LocatorUtils.property(thatLocator, "locator", rhsLocator), lhsLocator, rhsLocator, (this.locator!= null), (that.locator!= null))) { return false; } } { QName lhsResultTypeName; lhsResultTypeName = this.getResultTypeName(); QName rhsResultTypeName; rhsResultTypeName = that.getResultTypeName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "resultTypeName", lhsResultTypeName), LocatorUtils.property(thatLocator, "resultTypeName", rhsResultTypeName), lhsResultTypeName, rhsResultTypeName, (this.resultTypeName!= null), (that.resultTypeName!= null))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { List theAnnotation; theAnnotation = (((this.annotation!= null)&&(!this.annotation.isEmpty()))?this.getAnnotation():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "annotation", theAnnotation), currentHashCode, theAnnotation, ((this.annotation!= null)&&(!this.annotation.isEmpty()))); } { TypeSpecifier theResultTypeSpecifier; theResultTypeSpecifier = this.getResultTypeSpecifier(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "resultTypeSpecifier", theResultTypeSpecifier), currentHashCode, theResultTypeSpecifier, (this.resultTypeSpecifier!= null)); } { String theLocalId; theLocalId = this.getLocalId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "localId", theLocalId), currentHashCode, theLocalId, (this.localId!= null)); } { String theLocator; theLocator = this.getLocator(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "locator", theLocator), currentHashCode, theLocator, (this.locator!= null)); } { QName theResultTypeName; theResultTypeName = this.getResultTypeName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "resultTypeName", theResultTypeName), currentHashCode, theResultTypeName, (this.resultTypeName!= null)); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE2; return this.hashCode(null, strategy); } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } 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; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { List theAnnotation; theAnnotation = (((this.annotation!= null)&&(!this.annotation.isEmpty()))?this.getAnnotation():null); strategy.appendField(locator, this, "annotation", buffer, theAnnotation, ((this.annotation!= null)&&(!this.annotation.isEmpty()))); } { TypeSpecifier theResultTypeSpecifier; theResultTypeSpecifier = this.getResultTypeSpecifier(); strategy.appendField(locator, this, "resultTypeSpecifier", buffer, theResultTypeSpecifier, (this.resultTypeSpecifier!= null)); } { String theLocalId; theLocalId = this.getLocalId(); strategy.appendField(locator, this, "localId", buffer, theLocalId, (this.localId!= null)); } { String theLocator; theLocator = this.getLocator(); strategy.appendField(locator, this, "locator", buffer, theLocator, (this.locator!= null)); } { QName theResultTypeName; theResultTypeName = this.getResultTypeName(); strategy.appendField(locator, this, "resultTypeName", buffer, theResultTypeName, (this.resultTypeName!= null)); } return buffer; } }