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

org.somda.sdc.biceps.model.participant.ContainmentTreeEntry Maven / Gradle / Ivy

Go to download

SDCri is a set of Java libraries that implements a network communication framework conforming with the IEEE 11073 SDC specifications. This project implements the model for IEEE 11073-10207.

The newest version!

package org.somda.sdc.biceps.model.participant;

import javax.xml.namespace.QName;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
import org.somda.sdc.biceps.model.extension.ExtensionType;


/**
 * An entry in a CONTAINMENT TREE.
 * 
 * 

Java class for ContainmentTreeEntry complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ContainmentTreeEntry", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "extension", "type" }) public class ContainmentTreeEntry implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * If given, pm:AbstractDescriptor/pm:Type of the descriptor that is conveyed with the CONTAINMENT TREE entry. * */ @XmlElement(name = "Type", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected CodedValue type; /** * Handle reference to the descriptor that the CONTAINMENT TREE entry represents. * */ @XmlAttribute(name = "HandleRef") protected String handleRef; /** * Handle reference to the parent descriptor of the descriptor that this CONTAINMENT TREE entry represents. * */ @XmlAttribute(name = "ParentHandleRef") protected String parentHandleRef; /** * Qualified name of the descriptor that the CONTAINMENT TREE entry represents. * */ @XmlAttribute(name = "EntryType") protected QName entryType; /** * Number of child ELEMENTs that the CONTAINMENT TREE entry possesses. * */ @XmlAttribute(name = "ChildrenCount") protected Integer childrenCount; /** * Gets the value of the extension property. * * @return * possible object is * {@link ExtensionType } * */ @Nullable public ExtensionType getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setExtension( @Nullable ExtensionType value) { this.extension = value; } /** * If given, pm:AbstractDescriptor/pm:Type of the descriptor that is conveyed with the CONTAINMENT TREE entry. * * @return * possible object is * {@link CodedValue } * */ @Nullable public CodedValue getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link CodedValue } * * @see #getType() */ public void setType( @Nullable CodedValue value) { this.type = value; } /** * Handle reference to the descriptor that the CONTAINMENT TREE entry represents. * * @return * possible object is * {@link String } * */ @Nullable public String getHandleRef() { return handleRef; } /** * Sets the value of the handleRef property. * * @param value * allowed object is * {@link String } * * @see #getHandleRef() */ public void setHandleRef( @Nullable String value) { this.handleRef = value; } /** * Handle reference to the parent descriptor of the descriptor that this CONTAINMENT TREE entry represents. * * @return * possible object is * {@link String } * */ @Nullable public String getParentHandleRef() { return parentHandleRef; } /** * Sets the value of the parentHandleRef property. * * @param value * allowed object is * {@link String } * * @see #getParentHandleRef() */ public void setParentHandleRef( @Nullable String value) { this.parentHandleRef = value; } /** * Qualified name of the descriptor that the CONTAINMENT TREE entry represents. * * @return * possible object is * {@link QName } * */ @Nullable public QName getEntryType() { return entryType; } /** * Sets the value of the entryType property. * * @param value * allowed object is * {@link QName } * * @see #getEntryType() */ public void setEntryType( @Nullable QName value) { this.entryType = value; } /** * Number of child ELEMENTs that the CONTAINMENT TREE entry possesses. * * @return * possible object is * {@link Integer } * */ @Nullable public Integer getChildrenCount() { return childrenCount; } /** * Sets the value of the childrenCount property. * * @param value * allowed object is * {@link Integer } * * @see #getChildrenCount() */ public void setChildrenCount( @Nullable Integer value) { this.childrenCount = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ContainmentTreeEntry that = ((ContainmentTreeEntry) object); { ExtensionType leftExtension; leftExtension = this.getExtension(); ExtensionType rightExtension; rightExtension = that.getExtension(); if (this.extension!= null) { if (that.extension!= null) { if (!leftExtension.equals(rightExtension)) { return false; } } else { return false; } } else { if (that.extension!= null) { return false; } } } { CodedValue leftType; leftType = this.getType(); CodedValue rightType; rightType = that.getType(); if (this.type!= null) { if (that.type!= null) { if (!leftType.equals(rightType)) { return false; } } else { return false; } } else { if (that.type!= null) { return false; } } } { String leftHandleRef; leftHandleRef = this.getHandleRef(); String rightHandleRef; rightHandleRef = that.getHandleRef(); if (this.handleRef!= null) { if (that.handleRef!= null) { if (!leftHandleRef.equals(rightHandleRef)) { return false; } } else { return false; } } else { if (that.handleRef!= null) { return false; } } } { String leftParentHandleRef; leftParentHandleRef = this.getParentHandleRef(); String rightParentHandleRef; rightParentHandleRef = that.getParentHandleRef(); if (this.parentHandleRef!= null) { if (that.parentHandleRef!= null) { if (!leftParentHandleRef.equals(rightParentHandleRef)) { return false; } } else { return false; } } else { if (that.parentHandleRef!= null) { return false; } } } { QName leftEntryType; leftEntryType = this.getEntryType(); QName rightEntryType; rightEntryType = that.getEntryType(); if (this.entryType!= null) { if (that.entryType!= null) { if (!leftEntryType.equals(rightEntryType)) { return false; } } else { return false; } } else { if (that.entryType!= null) { return false; } } } { Integer leftChildrenCount; leftChildrenCount = this.getChildrenCount(); Integer rightChildrenCount; rightChildrenCount = that.getChildrenCount(); if (this.childrenCount!= null) { if (that.childrenCount!= null) { if (!leftChildrenCount.equals(rightChildrenCount)) { return false; } } else { return false; } } else { if (that.childrenCount!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); ExtensionType theExtension; theExtension = this.getExtension(); if (this.extension!= null) { currentHashCode += theExtension.hashCode(); } } { currentHashCode = (currentHashCode* 31); CodedValue theType; theType = this.getType(); if (this.type!= null) { currentHashCode += theType.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theHandleRef; theHandleRef = this.getHandleRef(); if (this.handleRef!= null) { currentHashCode += theHandleRef.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theParentHandleRef; theParentHandleRef = this.getParentHandleRef(); if (this.parentHandleRef!= null) { currentHashCode += theParentHandleRef.hashCode(); } } { currentHashCode = (currentHashCode* 31); QName theEntryType; theEntryType = this.getEntryType(); if (this.entryType!= null) { currentHashCode += theEntryType.hashCode(); } } { currentHashCode = (currentHashCode* 31); Integer theChildrenCount; theChildrenCount = this.getChildrenCount(); if (this.childrenCount!= null) { currentHashCode += theChildrenCount.hashCode(); } } return currentHashCode; } @Override public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override 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; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { ExtensionType theExtension; theExtension = this.getExtension(); strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null)); } { CodedValue theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { String theHandleRef; theHandleRef = this.getHandleRef(); strategy.appendField(locator, this, "handleRef", buffer, theHandleRef, (this.handleRef!= null)); } { String theParentHandleRef; theParentHandleRef = this.getParentHandleRef(); strategy.appendField(locator, this, "parentHandleRef", buffer, theParentHandleRef, (this.parentHandleRef!= null)); } { QName theEntryType; theEntryType = this.getEntryType(); strategy.appendField(locator, this, "entryType", buffer, theEntryType, (this.entryType!= null)); } { Integer theChildrenCount; theChildrenCount = this.getChildrenCount(); strategy.appendField(locator, this, "childrenCount", buffer, theChildrenCount, (this.childrenCount!= null)); } return buffer; } @Override public Object clone() { return copyTo(createNewInstance()); } @Override public Object copyTo(Object target) { final CopyStrategy strategy = JAXBCopyStrategy.getInstance(); return copyTo(null, target, strategy); } @Override public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof ContainmentTreeEntry) { final ContainmentTreeEntry copy = ((ContainmentTreeEntry) draftCopy); { Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null)); if (extensionShouldBeCopiedAndSet == Boolean.TRUE) { ExtensionType sourceExtension; sourceExtension = this.getExtension(); ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null))); copy.setExtension(copyExtension); } else { if (extensionShouldBeCopiedAndSet == Boolean.FALSE) { copy.extension = null; } } } { Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.type!= null)); if (typeShouldBeCopiedAndSet == Boolean.TRUE) { CodedValue sourceType; sourceType = this.getType(); CodedValue copyType = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, (this.type!= null))); copy.setType(copyType); } else { if (typeShouldBeCopiedAndSet == Boolean.FALSE) { copy.type = null; } } } { Boolean handleRefShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.handleRef!= null)); if (handleRefShouldBeCopiedAndSet == Boolean.TRUE) { String sourceHandleRef; sourceHandleRef = this.getHandleRef(); String copyHandleRef = ((String) strategy.copy(LocatorUtils.property(locator, "handleRef", sourceHandleRef), sourceHandleRef, (this.handleRef!= null))); copy.setHandleRef(copyHandleRef); } else { if (handleRefShouldBeCopiedAndSet == Boolean.FALSE) { copy.handleRef = null; } } } { Boolean parentHandleRefShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.parentHandleRef!= null)); if (parentHandleRefShouldBeCopiedAndSet == Boolean.TRUE) { String sourceParentHandleRef; sourceParentHandleRef = this.getParentHandleRef(); String copyParentHandleRef = ((String) strategy.copy(LocatorUtils.property(locator, "parentHandleRef", sourceParentHandleRef), sourceParentHandleRef, (this.parentHandleRef!= null))); copy.setParentHandleRef(copyParentHandleRef); } else { if (parentHandleRefShouldBeCopiedAndSet == Boolean.FALSE) { copy.parentHandleRef = null; } } } { Boolean entryTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.entryType!= null)); if (entryTypeShouldBeCopiedAndSet == Boolean.TRUE) { QName sourceEntryType; sourceEntryType = this.getEntryType(); QName copyEntryType = ((QName) strategy.copy(LocatorUtils.property(locator, "entryType", sourceEntryType), sourceEntryType, (this.entryType!= null))); copy.setEntryType(copyEntryType); } else { if (entryTypeShouldBeCopiedAndSet == Boolean.FALSE) { copy.entryType = null; } } } { Boolean childrenCountShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.childrenCount!= null)); if (childrenCountShouldBeCopiedAndSet == Boolean.TRUE) { Integer sourceChildrenCount; sourceChildrenCount = this.getChildrenCount(); Integer copyChildrenCount = ((Integer) strategy.copy(LocatorUtils.property(locator, "childrenCount", sourceChildrenCount), sourceChildrenCount, (this.childrenCount!= null))); copy.setChildrenCount(copyChildrenCount); } else { if (childrenCountShouldBeCopiedAndSet == Boolean.FALSE) { copy.childrenCount = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new ContainmentTreeEntry(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy