
org.hl7.elm_modelinfo.r1.ClassInfo Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.04.11 at 05:16:44 PM MDT
//
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.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
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="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 Equals, HashCode, ToString
{
@XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1")
protected List element;
@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 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 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, EqualsStrategy strategy) {
if (!(object instanceof ClassInfo)) {
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)) {
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)) {
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)) {
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)) {
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)) {
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)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy 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);
}
{
String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName);
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier);
}
{
String theLabel;
theLabel = this.getLabel();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "label", theLabel), currentHashCode, theLabel);
}
{
boolean theRetrievable;
theRetrievable = ((this.retrievable!= null)?this.isRetrievable():false);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "retrievable", theRetrievable), currentHashCode, theRetrievable);
}
{
String thePrimaryCodePath;
thePrimaryCodePath = this.getPrimaryCodePath();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "primaryCodePath", thePrimaryCodePath), currentHashCode, thePrimaryCodePath);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy 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);
}
{
String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName);
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier);
}
{
String theLabel;
theLabel = this.getLabel();
strategy.appendField(locator, this, "label", buffer, theLabel);
}
{
boolean theRetrievable;
theRetrievable = ((this.retrievable!= null)?this.isRetrievable():false);
strategy.appendField(locator, this, "retrievable", buffer, theRetrievable);
}
{
String thePrimaryCodePath;
thePrimaryCodePath = this.getPrimaryCodePath();
strategy.appendField(locator, this, "primaryCodePath", buffer, thePrimaryCodePath);
}
return buffer;
}
}