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

org.somda.sdc.biceps.model.participant.MdDescription 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.math.BigInteger;
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;


/**
 * MdDescription is the root container to represent the descriptive part of the MDIB. The descriptive part describes the capabilities provided by a POC MEDICAL DEVICE, e.g., which measurements, alerts and settings it provides. As the descriptive part does not change as frequently as the state part, it is well-known as the (almost) static part of the MDIB. The MdDescription's counterpart is pm:MdState.
 * 
 * 

Java class for MdDescription complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MdDescription", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "extension", "mds" }) public class MdDescription implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * List of MDSs that are contained in the MDIB. * */ @XmlElement(name = "Mds", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected List mds; /** * Version number of the description. The version number is incremented by one every time the descriptive part changes. The implied value SHALL be "0". * */ @XmlAttribute(name = "DescriptionVersion") protected BigInteger descriptionVersion; /** * 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; } /** * List of MDSs that are contained in the MDIB. * * Gets the value of the mds 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 mds property.

* *

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

*
     * getMds().add(newItem);
     * 
* * *

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

* * * @return * The value of the mds property. */ public List getMds() { if (mds == null) { mds = new ArrayList<>(); } return this.mds; } /** * Version number of the description. The version number is incremented by one every time the descriptive part changes. The implied value SHALL be "0". * * @return * possible object is * {@link BigInteger } * */ @Nullable public BigInteger getDescriptionVersion() { return descriptionVersion; } /** * Sets the value of the descriptionVersion property. * * @param value * allowed object is * {@link BigInteger } * * @see #getDescriptionVersion() */ public void setDescriptionVersion( @Nullable BigInteger value) { this.descriptionVersion = value; } public void setMds( @Nullable List value) { this.mds = null; if (value!= null) { List draftl = this.getMds(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final MdDescription that = ((MdDescription) 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 leftMds; leftMds = (((this.mds!= null)&&(!this.mds.isEmpty()))?this.getMds():null); List rightMds; rightMds = (((that.mds!= null)&&(!that.mds.isEmpty()))?that.getMds():null); if ((this.mds!= null)&&(!this.mds.isEmpty())) { if ((that.mds!= null)&&(!that.mds.isEmpty())) { if (!leftMds.equals(rightMds)) { return false; } } else { return false; } } else { if ((that.mds!= null)&&(!that.mds.isEmpty())) { return false; } } } { BigInteger leftDescriptionVersion; leftDescriptionVersion = this.getDescriptionVersion(); BigInteger rightDescriptionVersion; rightDescriptionVersion = that.getDescriptionVersion(); if (this.descriptionVersion!= null) { if (that.descriptionVersion!= null) { if (!leftDescriptionVersion.equals(rightDescriptionVersion)) { return false; } } else { return false; } } else { if (that.descriptionVersion!= 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 theMds; theMds = (((this.mds!= null)&&(!this.mds.isEmpty()))?this.getMds():null); if ((this.mds!= null)&&(!this.mds.isEmpty())) { currentHashCode += theMds.hashCode(); } } { currentHashCode = (currentHashCode* 31); BigInteger theDescriptionVersion; theDescriptionVersion = this.getDescriptionVersion(); if (this.descriptionVersion!= null) { currentHashCode += theDescriptionVersion.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 theMds; theMds = (((this.mds!= null)&&(!this.mds.isEmpty()))?this.getMds():null); strategy.appendField(locator, this, "mds", buffer, theMds, ((this.mds!= null)&&(!this.mds.isEmpty()))); } { BigInteger theDescriptionVersion; theDescriptionVersion = this.getDescriptionVersion(); strategy.appendField(locator, this, "descriptionVersion", buffer, theDescriptionVersion, (this.descriptionVersion!= 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 MdDescription) { final MdDescription copy = ((MdDescription) 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 mdsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.mds!= null)&&(!this.mds.isEmpty()))); if (mdsShouldBeCopiedAndSet == Boolean.TRUE) { List sourceMds; sourceMds = (((this.mds!= null)&&(!this.mds.isEmpty()))?this.getMds():null); @SuppressWarnings("unchecked") List copyMds = ((List ) strategy.copy(LocatorUtils.property(locator, "mds", sourceMds), sourceMds, ((this.mds!= null)&&(!this.mds.isEmpty())))); copy.setMds(copyMds); } else { if (mdsShouldBeCopiedAndSet == Boolean.FALSE) { copy.mds = null; } } } { Boolean descriptionVersionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.descriptionVersion!= null)); if (descriptionVersionShouldBeCopiedAndSet == Boolean.TRUE) { BigInteger sourceDescriptionVersion; sourceDescriptionVersion = this.getDescriptionVersion(); BigInteger copyDescriptionVersion = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "descriptionVersion", sourceDescriptionVersion), sourceDescriptionVersion, (this.descriptionVersion!= null))); copy.setDescriptionVersion(copyDescriptionVersion); } else { if (descriptionVersionShouldBeCopiedAndSet == Boolean.FALSE) { copy.descriptionVersion = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new MdDescription(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy