
org.hl7.elm_modelinfo.r1.ClassInfo Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.4.0-b180830.0438
// See https://javaee.github.io/jaxb-v2/
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.01.29 at 08:07:27 PM MST
//
package org.hl7.elm_modelinfo.r1;
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 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;
/**
* The ClassInfo type models information associated with a single class in the data model.
*
* Java class for ClassInfo complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="ClassInfo">
* <complexContent>
* <extension base="{urn:hl7-org:elm-modelinfo:r1}TypeInfo">
* <sequence>
* <element name="parameter" type="{urn:hl7-org:elm-modelinfo:r1}TypeParameterInfo" maxOccurs="unbounded" minOccurs="0"/>
* <element name="element" type="{urn:hl7-org:elm-modelinfo:r1}ClassInfoElement" maxOccurs="unbounded" minOccurs="0"/>
* <element name="contextRelationship" type="{urn:hl7-org:elm-modelinfo:r1}RelationshipInfo" maxOccurs="unbounded" minOccurs="0"/>
* <element name="targetContextRelationship" type="{urn:hl7-org:elm-modelinfo:r1}RelationshipInfo" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="namespace" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="retrievable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* <attribute name="primaryCodePath" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="primaryValueSetPath" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ClassInfo", namespace = "urn:hl7-org:elm-modelinfo:r1", propOrder = {
"parameter",
"element",
"contextRelationship",
"targetContextRelationship"
})
@XmlSeeAlso({
ProfileInfo.class
})
public class ClassInfo
extends TypeInfo
implements Equals2, HashCode2, ToString2
{
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List parameter;
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List element;
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List contextRelationship;
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List targetContextRelationship;
@XmlAttribute(name = "namespace")
protected String namespace;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "identifier")
protected String identifier;
@XmlAttribute(name = "label")
protected String label;
@XmlAttribute(name = "retrievable")
protected Boolean retrievable;
@XmlAttribute(name = "primaryCodePath")
protected String primaryCodePath;
@XmlAttribute(name = "primaryValueSetPath")
protected String primaryValueSetPath;
/**
* 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 JAXB 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 TypeParameterInfo }
*
*
*/
public List getParameter() {
if (parameter == null) {
parameter = new ArrayList();
}
return this.parameter;
}
/**
* Gets the value of the element 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 element property.
*
*
* For example, to add a new item, do as follows:
*
* getElement().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ClassInfoElement }
*
*
*/
public List getElement() {
if (element == null) {
element = new ArrayList();
}
return this.element;
}
/**
* Gets the value of the contextRelationship 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 contextRelationship property.
*
*
* For example, to add a new item, do as follows:
*
* getContextRelationship().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link RelationshipInfo }
*
*
*/
public List getContextRelationship() {
if (contextRelationship == null) {
contextRelationship = new ArrayList();
}
return this.contextRelationship;
}
/**
* Gets the value of the targetContextRelationship 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 targetContextRelationship property.
*
*
* For example, to add a new item, do as follows:
*
* getTargetContextRelationship().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link RelationshipInfo }
*
*
*/
public List getTargetContextRelationship() {
if (targetContextRelationship == null) {
targetContextRelationship = new ArrayList();
}
return this.targetContextRelationship;
}
/**
* Gets the value of the namespace property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNamespace() {
return namespace;
}
/**
* Sets the value of the namespace property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNamespace(String value) {
this.namespace = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdentifier() {
return identifier;
}
/**
* Sets the value of the identifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdentifier(String value) {
this.identifier = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets the value of the retrievable property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isRetrievable() {
if (retrievable == null) {
return false;
} else {
return retrievable;
}
}
/**
* Sets the value of the retrievable property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setRetrievable(Boolean value) {
this.retrievable = value;
}
/**
* Gets the value of the primaryCodePath property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPrimaryCodePath() {
return primaryCodePath;
}
/**
* Sets the value of the primaryCodePath property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrimaryCodePath(String value) {
this.primaryCodePath = value;
}
/**
* Gets the value of the primaryValueSetPath property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPrimaryValueSetPath() {
return primaryValueSetPath;
}
/**
* Sets the value of the primaryValueSetPath property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrimaryValueSetPath(String value) {
this.primaryValueSetPath = value;
}
public ClassInfo withParameter(TypeParameterInfo... values) {
if (values!= null) {
for (TypeParameterInfo value: values) {
getParameter().add(value);
}
}
return this;
}
public ClassInfo withParameter(Collection values) {
if (values!= null) {
getParameter().addAll(values);
}
return this;
}
public ClassInfo withElement(ClassInfoElement... values) {
if (values!= null) {
for (ClassInfoElement value: values) {
getElement().add(value);
}
}
return this;
}
public ClassInfo withElement(Collection values) {
if (values!= null) {
getElement().addAll(values);
}
return this;
}
public ClassInfo withContextRelationship(RelationshipInfo... values) {
if (values!= null) {
for (RelationshipInfo value: values) {
getContextRelationship().add(value);
}
}
return this;
}
public ClassInfo withContextRelationship(Collection values) {
if (values!= null) {
getContextRelationship().addAll(values);
}
return this;
}
public ClassInfo withTargetContextRelationship(RelationshipInfo... values) {
if (values!= null) {
for (RelationshipInfo value: values) {
getTargetContextRelationship().add(value);
}
}
return this;
}
public ClassInfo withTargetContextRelationship(Collection values) {
if (values!= null) {
getTargetContextRelationship().addAll(values);
}
return this;
}
public ClassInfo withNamespace(String value) {
setNamespace(value);
return this;
}
public ClassInfo withName(String value) {
setName(value);
return this;
}
public ClassInfo withIdentifier(String value) {
setIdentifier(value);
return this;
}
public ClassInfo withLabel(String value) {
setLabel(value);
return this;
}
public ClassInfo withRetrievable(Boolean value) {
setRetrievable(value);
return this;
}
public ClassInfo withPrimaryCodePath(String value) {
setPrimaryCodePath(value);
return this;
}
public ClassInfo withPrimaryValueSetPath(String value) {
setPrimaryValueSetPath(value);
return this;
}
@Override
public ClassInfo withBaseTypeSpecifier(TypeSpecifier value) {
setBaseTypeSpecifier(value);
return this;
}
@Override
public ClassInfo withBaseType(String value) {
setBaseType(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;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final ClassInfo that = ((ClassInfo) object);
{
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 lhsElement;
lhsElement = (((this.element!= null)&&(!this.element.isEmpty()))?this.getElement():null);
List rhsElement;
rhsElement = (((that.element!= null)&&(!that.element.isEmpty()))?that.getElement():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "element", lhsElement), LocatorUtils.property(thatLocator, "element", rhsElement), lhsElement, rhsElement, ((this.element!= null)&&(!this.element.isEmpty())), ((that.element!= null)&&(!that.element.isEmpty())))) {
return false;
}
}
{
List lhsContextRelationship;
lhsContextRelationship = (((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty()))?this.getContextRelationship():null);
List rhsContextRelationship;
rhsContextRelationship = (((that.contextRelationship!= null)&&(!that.contextRelationship.isEmpty()))?that.getContextRelationship():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "contextRelationship", lhsContextRelationship), LocatorUtils.property(thatLocator, "contextRelationship", rhsContextRelationship), lhsContextRelationship, rhsContextRelationship, ((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty())), ((that.contextRelationship!= null)&&(!that.contextRelationship.isEmpty())))) {
return false;
}
}
{
List lhsTargetContextRelationship;
lhsTargetContextRelationship = (((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty()))?this.getTargetContextRelationship():null);
List rhsTargetContextRelationship;
rhsTargetContextRelationship = (((that.targetContextRelationship!= null)&&(!that.targetContextRelationship.isEmpty()))?that.getTargetContextRelationship():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "targetContextRelationship", lhsTargetContextRelationship), LocatorUtils.property(thatLocator, "targetContextRelationship", rhsTargetContextRelationship), lhsTargetContextRelationship, rhsTargetContextRelationship, ((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty())), ((that.targetContextRelationship!= null)&&(!that.targetContextRelationship.isEmpty())))) {
return false;
}
}
{
String lhsNamespace;
lhsNamespace = this.getNamespace();
String rhsNamespace;
rhsNamespace = that.getNamespace();
if (!strategy.equals(LocatorUtils.property(thisLocator, "namespace", lhsNamespace), LocatorUtils.property(thatLocator, "namespace", rhsNamespace), lhsNamespace, rhsNamespace, (this.namespace!= null), (that.namespace!= null))) {
return false;
}
}
{
String lhsName;
lhsName = this.getName();
String 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;
}
}
{
String lhsIdentifier;
lhsIdentifier = this.getIdentifier();
String rhsIdentifier;
rhsIdentifier = that.getIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, (this.identifier!= null), (that.identifier!= null))) {
return false;
}
}
{
String lhsLabel;
lhsLabel = this.getLabel();
String rhsLabel;
rhsLabel = that.getLabel();
if (!strategy.equals(LocatorUtils.property(thisLocator, "label", lhsLabel), LocatorUtils.property(thatLocator, "label", rhsLabel), lhsLabel, rhsLabel, (this.label!= null), (that.label!= null))) {
return false;
}
}
{
boolean lhsRetrievable;
lhsRetrievable = ((this.retrievable!= null)?this.isRetrievable():false);
boolean rhsRetrievable;
rhsRetrievable = ((that.retrievable!= null)?that.isRetrievable():false);
if (!strategy.equals(LocatorUtils.property(thisLocator, "retrievable", lhsRetrievable), LocatorUtils.property(thatLocator, "retrievable", rhsRetrievable), lhsRetrievable, rhsRetrievable, (this.retrievable!= null), (that.retrievable!= null))) {
return false;
}
}
{
String lhsPrimaryCodePath;
lhsPrimaryCodePath = this.getPrimaryCodePath();
String rhsPrimaryCodePath;
rhsPrimaryCodePath = that.getPrimaryCodePath();
if (!strategy.equals(LocatorUtils.property(thisLocator, "primaryCodePath", lhsPrimaryCodePath), LocatorUtils.property(thatLocator, "primaryCodePath", rhsPrimaryCodePath), lhsPrimaryCodePath, rhsPrimaryCodePath, (this.primaryCodePath!= null), (that.primaryCodePath!= null))) {
return false;
}
}
{
String lhsPrimaryValueSetPath;
lhsPrimaryValueSetPath = this.getPrimaryValueSetPath();
String rhsPrimaryValueSetPath;
rhsPrimaryValueSetPath = that.getPrimaryValueSetPath();
if (!strategy.equals(LocatorUtils.property(thisLocator, "primaryValueSetPath", lhsPrimaryValueSetPath), LocatorUtils.property(thatLocator, "primaryValueSetPath", rhsPrimaryValueSetPath), lhsPrimaryValueSetPath, rhsPrimaryValueSetPath, (this.primaryValueSetPath!= null), (that.primaryValueSetPath!= 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 = super.hashCode(locator, strategy);
{
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 theElement;
theElement = (((this.element!= null)&&(!this.element.isEmpty()))?this.getElement():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "element", theElement), currentHashCode, theElement, ((this.element!= null)&&(!this.element.isEmpty())));
}
{
List theContextRelationship;
theContextRelationship = (((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty()))?this.getContextRelationship():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contextRelationship", theContextRelationship), currentHashCode, theContextRelationship, ((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty())));
}
{
List theTargetContextRelationship;
theTargetContextRelationship = (((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty()))?this.getTargetContextRelationship():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "targetContextRelationship", theTargetContextRelationship), currentHashCode, theTargetContextRelationship, ((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty())));
}
{
String theNamespace;
theNamespace = this.getNamespace();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "namespace", theNamespace), currentHashCode, theNamespace, (this.namespace!= null));
}
{
String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null));
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, (this.identifier!= null));
}
{
String theLabel;
theLabel = this.getLabel();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "label", theLabel), currentHashCode, theLabel, (this.label!= null));
}
{
boolean theRetrievable;
theRetrievable = ((this.retrievable!= null)?this.isRetrievable():false);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "retrievable", theRetrievable), currentHashCode, theRetrievable, (this.retrievable!= null));
}
{
String thePrimaryCodePath;
thePrimaryCodePath = this.getPrimaryCodePath();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "primaryCodePath", thePrimaryCodePath), currentHashCode, thePrimaryCodePath, (this.primaryCodePath!= null));
}
{
String thePrimaryValueSetPath;
thePrimaryValueSetPath = this.getPrimaryValueSetPath();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "primaryValueSetPath", thePrimaryValueSetPath), currentHashCode, thePrimaryValueSetPath, (this.primaryValueSetPath!= 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) {
super.appendFields(locator, buffer, strategy);
{
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 theElement;
theElement = (((this.element!= null)&&(!this.element.isEmpty()))?this.getElement():null);
strategy.appendField(locator, this, "element", buffer, theElement, ((this.element!= null)&&(!this.element.isEmpty())));
}
{
List theContextRelationship;
theContextRelationship = (((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty()))?this.getContextRelationship():null);
strategy.appendField(locator, this, "contextRelationship", buffer, theContextRelationship, ((this.contextRelationship!= null)&&(!this.contextRelationship.isEmpty())));
}
{
List theTargetContextRelationship;
theTargetContextRelationship = (((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty()))?this.getTargetContextRelationship():null);
strategy.appendField(locator, this, "targetContextRelationship", buffer, theTargetContextRelationship, ((this.targetContextRelationship!= null)&&(!this.targetContextRelationship.isEmpty())));
}
{
String theNamespace;
theNamespace = this.getNamespace();
strategy.appendField(locator, this, "namespace", buffer, theNamespace, (this.namespace!= null));
}
{
String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null));
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, (this.identifier!= null));
}
{
String theLabel;
theLabel = this.getLabel();
strategy.appendField(locator, this, "label", buffer, theLabel, (this.label!= null));
}
{
boolean theRetrievable;
theRetrievable = ((this.retrievable!= null)?this.isRetrievable():false);
strategy.appendField(locator, this, "retrievable", buffer, theRetrievable, (this.retrievable!= null));
}
{
String thePrimaryCodePath;
thePrimaryCodePath = this.getPrimaryCodePath();
strategy.appendField(locator, this, "primaryCodePath", buffer, thePrimaryCodePath, (this.primaryCodePath!= null));
}
{
String thePrimaryValueSetPath;
thePrimaryValueSetPath = this.getPrimaryValueSetPath();
strategy.appendField(locator, this, "primaryValueSetPath", buffer, thePrimaryValueSetPath, (this.primaryValueSetPath!= null));
}
return buffer;
}
}