
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:17:09 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="element" type="{urn:hl7-org:elm-modelinfo:r1}ClassInfoElement" 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" />
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ClassInfo", namespace = "urn:hl7-org:elm-modelinfo:r1", propOrder = {
"element"
})
@XmlSeeAlso({
ProfileInfo.class
})
public class ClassInfo
extends TypeInfo
implements Equals2, HashCode2, ToString2
{
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List element;
@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;
/**
* 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 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;
}
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 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;
}
@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 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;
}
}
{
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;
}
}
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 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())));
}
{
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));
}
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 theElement;
theElement = (((this.element!= null)&&(!this.element.isEmpty()))?this.getElement():null);
strategy.appendField(locator, this, "element", buffer, theElement, ((this.element!= null)&&(!this.element.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));
}
return buffer;
}
}