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

org.somda.sdc.biceps.model.participant.AbstractMultiState 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 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.XmlSeeAlso;
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;


/**
 * AbstractMultiState is derived from pm:AbstractState. In contrast to pm:AbstractState, AbstractMultiState possesses a HANDLE name. The HANDLE name uniquely identifies the state, which is required if the relation to a descriptor is ambiguous.
 * 
 * 

Java class for AbstractMultiState complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractMultiState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "category" }) @XmlSeeAlso({ AbstractContextState.class }) public class AbstractMultiState extends AbstractState implements Cloneable, CopyTo, ToString { /** * A CODED VALUE that allows to categorize a multi state inside the set of multi states that belong to a descriptor of a certain type. * NOTE—By using the pm:AbstractMultiState/pm:Category it is possible to represent, e.g., different steps in a workflow (multiple states) with different association states. This is in contrast to the pm:WorkflowContextDescriptor/pm:Type where different workflow types are described that the POC MEDICAL DEVICE supports. See Clause 5.2.6 for more details. * */ @XmlElement(name = "Category", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected CodedValue category; /** * A name to uniquely identify the state. * */ @XmlAttribute(name = "Handle", required = true) protected String handle; /** * A CODED VALUE that allows to categorize a multi state inside the set of multi states that belong to a descriptor of a certain type. * NOTE—By using the pm:AbstractMultiState/pm:Category it is possible to represent, e.g., different steps in a workflow (multiple states) with different association states. This is in contrast to the pm:WorkflowContextDescriptor/pm:Type where different workflow types are described that the POC MEDICAL DEVICE supports. See Clause 5.2.6 for more details. * * @return * possible object is * {@link CodedValue } * */ @Nullable public CodedValue getCategory() { return category; } /** * Sets the value of the category property. * * @param value * allowed object is * {@link CodedValue } * * @see #getCategory() */ public void setCategory( @Nullable CodedValue value) { this.category = value; } /** * A name to uniquely identify the state. * * @return * possible object is * {@link String } * */ public String getHandle() { return handle; } /** * Sets the value of the handle property. * * @param value * allowed object is * {@link String } * * @see #getHandle() */ public void setHandle(String value) { this.handle = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } if (!super.equals(object)) { return false; } final AbstractMultiState that = ((AbstractMultiState) object); { CodedValue leftCategory; leftCategory = this.getCategory(); CodedValue rightCategory; rightCategory = that.getCategory(); if (this.category!= null) { if (that.category!= null) { if (!leftCategory.equals(rightCategory)) { return false; } } else { return false; } } else { if (that.category!= null) { return false; } } } { String leftHandle; leftHandle = this.getHandle(); String rightHandle; rightHandle = that.getHandle(); if (this.handle!= null) { if (that.handle!= null) { if (!leftHandle.equals(rightHandle)) { return false; } } else { return false; } } else { if (that.handle!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); CodedValue theCategory; theCategory = this.getCategory(); if (this.category!= null) { currentHashCode += theCategory.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theHandle; theHandle = this.getHandle(); if (this.handle!= null) { currentHashCode += theHandle.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) { super.appendFields(locator, buffer, strategy); { CodedValue theCategory; theCategory = this.getCategory(); strategy.appendField(locator, this, "category", buffer, theCategory, (this.category!= null)); } { String theHandle; theHandle = this.getHandle(); strategy.appendField(locator, this, "handle", buffer, theHandle, (this.handle!= 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); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof AbstractMultiState) { final AbstractMultiState copy = ((AbstractMultiState) draftCopy); { Boolean categoryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.category!= null)); if (categoryShouldBeCopiedAndSet == Boolean.TRUE) { CodedValue sourceCategory; sourceCategory = this.getCategory(); CodedValue copyCategory = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "category", sourceCategory), sourceCategory, (this.category!= null))); copy.setCategory(copyCategory); } else { if (categoryShouldBeCopiedAndSet == Boolean.FALSE) { copy.category = null; } } } { Boolean handleShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.handle!= null)); if (handleShouldBeCopiedAndSet == Boolean.TRUE) { String sourceHandle; sourceHandle = this.getHandle(); String copyHandle = ((String) strategy.copy(LocatorUtils.property(locator, "handle", sourceHandle), sourceHandle, (this.handle!= null))); copy.setHandle(copyHandle); } else { if (handleShouldBeCopiedAndSet == Boolean.FALSE) { copy.handle = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new AbstractMultiState(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy