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

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


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

import java.util.ArrayList;
import java.util.List;
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;


/**
 * CONTAINMENT TREE part of an ELEMENT of an MDS CONTAINMENT TREE.
 * 
 * 

Java class for ContainmentTree complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ContainmentTree", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "extension", "entry" }) public class ContainmentTree implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * An entry of a CONTAINMENT TREE ENTRY. * */ @XmlElement(name = "Entry", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected List entry; /** * 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; } /** * An entry of a CONTAINMENT TREE ENTRY. * * Gets the value of the entry 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 entry property.

* *

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

*
     * getEntry().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ContainmentTreeEntry } *

* * * @return * The value of the entry property. */ public List getEntry() { if (entry == null) { entry = new ArrayList<>(); } return this.entry; } /** * 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; } public void setEntry( @Nullable List value) { this.entry = null; if (value!= null) { List draftl = this.getEntry(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ContainmentTree that = ((ContainmentTree) 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; } } } { List leftEntry; leftEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); List rightEntry; rightEntry = (((that.entry!= null)&&(!that.entry.isEmpty()))?that.getEntry():null); if ((this.entry!= null)&&(!this.entry.isEmpty())) { if ((that.entry!= null)&&(!that.entry.isEmpty())) { if (!leftEntry.equals(rightEntry)) { return false; } } else { return false; } } else { if ((that.entry!= null)&&(!that.entry.isEmpty())) { 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); List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); if ((this.entry!= null)&&(!this.entry.isEmpty())) { currentHashCode += theEntry.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)); } { List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); strategy.appendField(locator, this, "entry", buffer, theEntry, ((this.entry!= null)&&(!this.entry.isEmpty()))); } { 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 ContainmentTree) { final ContainmentTree copy = ((ContainmentTree) 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 entryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.entry!= null)&&(!this.entry.isEmpty()))); if (entryShouldBeCopiedAndSet == Boolean.TRUE) { List sourceEntry; sourceEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); @SuppressWarnings("unchecked") List copyEntry = ((List ) strategy.copy(LocatorUtils.property(locator, "entry", sourceEntry), sourceEntry, ((this.entry!= null)&&(!this.entry.isEmpty())))); copy.setEntry(copyEntry); } else { if (entryShouldBeCopiedAndSet == Boolean.FALSE) { copy.entry = 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 ContainmentTree(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy