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

org.somda.sdc.biceps.model.participant.ScoState 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 java.util.ArrayList;
import java.util.List;
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;


/**
 * Corresponding state of pm:ScoDescriptor.
 * 
 * 

Java class for ScoState complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *           
 *             
 *               
 *                 
 *                   
 *                   
 *                 
 *                 
 *                 
 *               
 *             
 *           
 *         
 *       
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ScoState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "operationGroup" }) public class ScoState extends AbstractDeviceComponentState implements Cloneable, CopyTo, ToString { /** * OperationGroup defines groups of operations in order to allow clinical grouping and prioritization of operations. * */ @XmlElement(name = "OperationGroup", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected List operationGroup; /** * Prioritized list of operations that are requested to be invoked by a SERVICE CONSUMER. * */ @XmlAttribute(name = "InvocationRequested") protected List invocationRequested; /** * Prioritized list of operations that are required to be invoked by a SERVICE CONSUMER. * */ @XmlAttribute(name = "InvocationRequired") protected List invocationRequired; /** * OperationGroup defines groups of operations in order to allow clinical grouping and prioritization of operations. * * Gets the value of the operationGroup 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 operationGroup property.

* *

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

*
     * getOperationGroup().add(newItem);
     * 
* * *

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

* * * @return * The value of the operationGroup property. */ public List getOperationGroup() { if (operationGroup == null) { operationGroup = new ArrayList<>(); } return this.operationGroup; } /** * Prioritized list of operations that are requested to be invoked by a SERVICE CONSUMER. * * Gets the value of the invocationRequested 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 invocationRequested property.

* *

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

*
     * getInvocationRequested().add(newItem);
     * 
* * *

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

* * * @return * The value of the invocationRequested property. */ @Nullable public List getInvocationRequested() { if (invocationRequested == null) { invocationRequested = new ArrayList<>(); } return this.invocationRequested; } /** * Prioritized list of operations that are required to be invoked by a SERVICE CONSUMER. * * Gets the value of the invocationRequired 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 invocationRequired property.

* *

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

*
     * getInvocationRequired().add(newItem);
     * 
* * *

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

* * * @return * The value of the invocationRequired property. */ @Nullable public List getInvocationRequired() { if (invocationRequired == null) { invocationRequired = new ArrayList<>(); } return this.invocationRequired; } public void setOperationGroup( @Nullable List value) { this.operationGroup = null; if (value!= null) { List draftl = this.getOperationGroup(); draftl.addAll(value); } } public void setInvocationRequested( @Nullable List value) { this.invocationRequested = null; if (value!= null) { List draftl = this.getInvocationRequested(); draftl.addAll(value); } } public void setInvocationRequired( @Nullable List value) { this.invocationRequired = null; if (value!= null) { List draftl = this.getInvocationRequired(); draftl.addAll(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 ScoState that = ((ScoState) object); { List leftOperationGroup; leftOperationGroup = (((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))?this.getOperationGroup():null); List rightOperationGroup; rightOperationGroup = (((that.operationGroup!= null)&&(!that.operationGroup.isEmpty()))?that.getOperationGroup():null); if ((this.operationGroup!= null)&&(!this.operationGroup.isEmpty())) { if ((that.operationGroup!= null)&&(!that.operationGroup.isEmpty())) { if (!leftOperationGroup.equals(rightOperationGroup)) { return false; } } else { return false; } } else { if ((that.operationGroup!= null)&&(!that.operationGroup.isEmpty())) { return false; } } } { List leftInvocationRequested; leftInvocationRequested = (((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))?this.getInvocationRequested():null); List rightInvocationRequested; rightInvocationRequested = (((that.invocationRequested!= null)&&(!that.invocationRequested.isEmpty()))?that.getInvocationRequested():null); if ((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty())) { if ((that.invocationRequested!= null)&&(!that.invocationRequested.isEmpty())) { if (!leftInvocationRequested.equals(rightInvocationRequested)) { return false; } } else { return false; } } else { if ((that.invocationRequested!= null)&&(!that.invocationRequested.isEmpty())) { return false; } } } { List leftInvocationRequired; leftInvocationRequired = (((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))?this.getInvocationRequired():null); List rightInvocationRequired; rightInvocationRequired = (((that.invocationRequired!= null)&&(!that.invocationRequired.isEmpty()))?that.getInvocationRequired():null); if ((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty())) { if ((that.invocationRequired!= null)&&(!that.invocationRequired.isEmpty())) { if (!leftInvocationRequired.equals(rightInvocationRequired)) { return false; } } else { return false; } } else { if ((that.invocationRequired!= null)&&(!that.invocationRequired.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); List theOperationGroup; theOperationGroup = (((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))?this.getOperationGroup():null); if ((this.operationGroup!= null)&&(!this.operationGroup.isEmpty())) { currentHashCode += theOperationGroup.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theInvocationRequested; theInvocationRequested = (((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))?this.getInvocationRequested():null); if ((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty())) { currentHashCode += theInvocationRequested.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theInvocationRequired; theInvocationRequired = (((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))?this.getInvocationRequired():null); if ((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty())) { currentHashCode += theInvocationRequired.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); { List theOperationGroup; theOperationGroup = (((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))?this.getOperationGroup():null); strategy.appendField(locator, this, "operationGroup", buffer, theOperationGroup, ((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))); } { List theInvocationRequested; theInvocationRequested = (((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))?this.getInvocationRequested():null); strategy.appendField(locator, this, "invocationRequested", buffer, theInvocationRequested, ((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))); } { List theInvocationRequired; theInvocationRequired = (((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))?this.getInvocationRequired():null); strategy.appendField(locator, this, "invocationRequired", buffer, theInvocationRequired, ((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))); } 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 ScoState) { final ScoState copy = ((ScoState) draftCopy); { Boolean operationGroupShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))); if (operationGroupShouldBeCopiedAndSet == Boolean.TRUE) { List sourceOperationGroup; sourceOperationGroup = (((this.operationGroup!= null)&&(!this.operationGroup.isEmpty()))?this.getOperationGroup():null); @SuppressWarnings("unchecked") List copyOperationGroup = ((List ) strategy.copy(LocatorUtils.property(locator, "operationGroup", sourceOperationGroup), sourceOperationGroup, ((this.operationGroup!= null)&&(!this.operationGroup.isEmpty())))); copy.setOperationGroup(copyOperationGroup); } else { if (operationGroupShouldBeCopiedAndSet == Boolean.FALSE) { copy.operationGroup = null; } } } { Boolean invocationRequestedShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))); if (invocationRequestedShouldBeCopiedAndSet == Boolean.TRUE) { List sourceInvocationRequested; sourceInvocationRequested = (((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty()))?this.getInvocationRequested():null); @SuppressWarnings("unchecked") List copyInvocationRequested = ((List ) strategy.copy(LocatorUtils.property(locator, "invocationRequested", sourceInvocationRequested), sourceInvocationRequested, ((this.invocationRequested!= null)&&(!this.invocationRequested.isEmpty())))); copy.setInvocationRequested(copyInvocationRequested); } else { if (invocationRequestedShouldBeCopiedAndSet == Boolean.FALSE) { copy.invocationRequested = null; } } } { Boolean invocationRequiredShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))); if (invocationRequiredShouldBeCopiedAndSet == Boolean.TRUE) { List sourceInvocationRequired; sourceInvocationRequired = (((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty()))?this.getInvocationRequired():null); @SuppressWarnings("unchecked") List copyInvocationRequired = ((List ) strategy.copy(LocatorUtils.property(locator, "invocationRequired", sourceInvocationRequired), sourceInvocationRequired, ((this.invocationRequired!= null)&&(!this.invocationRequired.isEmpty())))); copy.setInvocationRequired(copyInvocationRequired); } else { if (invocationRequiredShouldBeCopiedAndSet == Boolean.FALSE) { copy.invocationRequired = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new ScoState(); } /** *

Java class for anonymous complex type

. * *

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

* *
{@code
     * 
     *   
     *     
     *       
     *         
     *         
     *       
     *       
     *       
     *     
     *   
     * 
     * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extension", "type" }) public static class OperationGroup implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * Type sematically describes the operation group. * */ @XmlElement(name = "Type", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected CodedValue type; /** * OperatingMode defines the operating mode of the whole operation group, see also pm:OperatingMode. * */ @XmlAttribute(name = "OperatingMode") protected OperatingMode operatingMode; /** * Handle references to all operations enclosed by the operation group. The list is ordered such that the entry with a lower list index has a higher clinical relevance than any entry with a higher list index. The SERVICE PROVIDER defines the clinical relevance and MAY reorder the list at any time. * */ @XmlAttribute(name = "Operations") protected List operations; /** * 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; } /** * Type sematically describes the operation group. * * @return * possible object is * {@link CodedValue } * */ public CodedValue getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link CodedValue } * * @see #getType() */ public void setType(CodedValue value) { this.type = value; } /** * OperatingMode defines the operating mode of the whole operation group, see also pm:OperatingMode. * * @return * possible object is * {@link OperatingMode } * */ @Nullable public OperatingMode getOperatingMode() { return operatingMode; } /** * Sets the value of the operatingMode property. * * @param value * allowed object is * {@link OperatingMode } * * @see #getOperatingMode() */ public void setOperatingMode( @Nullable OperatingMode value) { this.operatingMode = value; } /** * Handle references to all operations enclosed by the operation group. The list is ordered such that the entry with a lower list index has a higher clinical relevance than any entry with a higher list index. The SERVICE PROVIDER defines the clinical relevance and MAY reorder the list at any time. * * Gets the value of the operations 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 operations property.

* *

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

*
         * getOperations().add(newItem);
         * 
* * *

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

* * * @return * The value of the operations property. */ @Nullable public List getOperations() { if (operations == null) { operations = new ArrayList<>(); } return this.operations; } public void setOperations( @Nullable List value) { this.operations = null; if (value!= null) { List draftl = this.getOperations(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ScoState.OperationGroup that = ((ScoState.OperationGroup) 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; } } } { OperatingMode leftOperatingMode; leftOperatingMode = this.getOperatingMode(); OperatingMode rightOperatingMode; rightOperatingMode = that.getOperatingMode(); if (this.operatingMode!= null) { if (that.operatingMode!= null) { if (!leftOperatingMode.equals(rightOperatingMode)) { return false; } } else { return false; } } else { if (that.operatingMode!= null) { return false; } } } { List leftOperations; leftOperations = (((this.operations!= null)&&(!this.operations.isEmpty()))?this.getOperations():null); List rightOperations; rightOperations = (((that.operations!= null)&&(!that.operations.isEmpty()))?that.getOperations():null); if ((this.operations!= null)&&(!this.operations.isEmpty())) { if ((that.operations!= null)&&(!that.operations.isEmpty())) { if (!leftOperations.equals(rightOperations)) { return false; } } else { return false; } } else { if ((that.operations!= null)&&(!that.operations.isEmpty())) { 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); OperatingMode theOperatingMode; theOperatingMode = this.getOperatingMode(); if (this.operatingMode!= null) { currentHashCode += theOperatingMode.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theOperations; theOperations = (((this.operations!= null)&&(!this.operations.isEmpty()))?this.getOperations():null); if ((this.operations!= null)&&(!this.operations.isEmpty())) { currentHashCode += theOperations.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)); } { OperatingMode theOperatingMode; theOperatingMode = this.getOperatingMode(); strategy.appendField(locator, this, "operatingMode", buffer, theOperatingMode, (this.operatingMode!= null)); } { List theOperations; theOperations = (((this.operations!= null)&&(!this.operations.isEmpty()))?this.getOperations():null); strategy.appendField(locator, this, "operations", buffer, theOperations, ((this.operations!= null)&&(!this.operations.isEmpty()))); } 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 ScoState.OperationGroup) { final ScoState.OperationGroup copy = ((ScoState.OperationGroup) 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 operatingModeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.operatingMode!= null)); if (operatingModeShouldBeCopiedAndSet == Boolean.TRUE) { OperatingMode sourceOperatingMode; sourceOperatingMode = this.getOperatingMode(); OperatingMode copyOperatingMode = ((OperatingMode) strategy.copy(LocatorUtils.property(locator, "operatingMode", sourceOperatingMode), sourceOperatingMode, (this.operatingMode!= null))); copy.setOperatingMode(copyOperatingMode); } else { if (operatingModeShouldBeCopiedAndSet == Boolean.FALSE) { copy.operatingMode = null; } } } { Boolean operationsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.operations!= null)&&(!this.operations.isEmpty()))); if (operationsShouldBeCopiedAndSet == Boolean.TRUE) { List sourceOperations; sourceOperations = (((this.operations!= null)&&(!this.operations.isEmpty()))?this.getOperations():null); @SuppressWarnings("unchecked") List copyOperations = ((List ) strategy.copy(LocatorUtils.property(locator, "operations", sourceOperations), sourceOperations, ((this.operations!= null)&&(!this.operations.isEmpty())))); copy.setOperations(copyOperations); } else { if (operationsShouldBeCopiedAndSet == Boolean.FALSE) { copy.operations = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new ScoState.OperationGroup(); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy