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

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


/**
 * State of a stream METRIC descriptor. It contains a list of sample values. This sample array is used to transport waveform stream information.
 * 
 * 

Java class for RealTimeSampleArrayMetricState complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RealTimeSampleArrayMetricState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "metricValue", "physiologicalRange" }) public class RealTimeSampleArrayMetricState extends AbstractMetricState implements Cloneable, CopyTo, ToString { /** * OPTIONAL current value of the METRIC. * */ @XmlElement(name = "MetricValue", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected SampleArrayValue metricValue; /** * The physiological reasonable range of determined values. * * NOTE—This is not an alarming range. * */ @XmlElement(name = "PhysiologicalRange", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected List physiologicalRange; /** * OPTIONAL current value of the METRIC. * * @return * possible object is * {@link SampleArrayValue } * */ @Nullable public SampleArrayValue getMetricValue() { return metricValue; } /** * Sets the value of the metricValue property. * * @param value * allowed object is * {@link SampleArrayValue } * * @see #getMetricValue() */ public void setMetricValue( @Nullable SampleArrayValue value) { this.metricValue = value; } /** * The physiological reasonable range of determined values. * * NOTE—This is not an alarming range. * * Gets the value of the physiologicalRange 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 physiologicalRange property.

* *

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

*
     * getPhysiologicalRange().add(newItem);
     * 
* * *

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

* * * @return * The value of the physiologicalRange property. */ public List getPhysiologicalRange() { if (physiologicalRange == null) { physiologicalRange = new ArrayList<>(); } return this.physiologicalRange; } public void setPhysiologicalRange( @Nullable List value) { this.physiologicalRange = null; if (value!= null) { List draftl = this.getPhysiologicalRange(); 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 RealTimeSampleArrayMetricState that = ((RealTimeSampleArrayMetricState) object); { SampleArrayValue leftMetricValue; leftMetricValue = this.getMetricValue(); SampleArrayValue rightMetricValue; rightMetricValue = that.getMetricValue(); if (this.metricValue!= null) { if (that.metricValue!= null) { if (!leftMetricValue.equals(rightMetricValue)) { return false; } } else { return false; } } else { if (that.metricValue!= null) { return false; } } } { List leftPhysiologicalRange; leftPhysiologicalRange = (((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty()))?this.getPhysiologicalRange():null); List rightPhysiologicalRange; rightPhysiologicalRange = (((that.physiologicalRange!= null)&&(!that.physiologicalRange.isEmpty()))?that.getPhysiologicalRange():null); if ((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty())) { if ((that.physiologicalRange!= null)&&(!that.physiologicalRange.isEmpty())) { if (!leftPhysiologicalRange.equals(rightPhysiologicalRange)) { return false; } } else { return false; } } else { if ((that.physiologicalRange!= null)&&(!that.physiologicalRange.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); SampleArrayValue theMetricValue; theMetricValue = this.getMetricValue(); if (this.metricValue!= null) { currentHashCode += theMetricValue.hashCode(); } } { currentHashCode = (currentHashCode* 31); List thePhysiologicalRange; thePhysiologicalRange = (((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty()))?this.getPhysiologicalRange():null); if ((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty())) { currentHashCode += thePhysiologicalRange.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); { SampleArrayValue theMetricValue; theMetricValue = this.getMetricValue(); strategy.appendField(locator, this, "metricValue", buffer, theMetricValue, (this.metricValue!= null)); } { List thePhysiologicalRange; thePhysiologicalRange = (((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty()))?this.getPhysiologicalRange():null); strategy.appendField(locator, this, "physiologicalRange", buffer, thePhysiologicalRange, ((this.physiologicalRange!= null)&&(!this.physiologicalRange.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 RealTimeSampleArrayMetricState) { final RealTimeSampleArrayMetricState copy = ((RealTimeSampleArrayMetricState) draftCopy); { Boolean metricValueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.metricValue!= null)); if (metricValueShouldBeCopiedAndSet == Boolean.TRUE) { SampleArrayValue sourceMetricValue; sourceMetricValue = this.getMetricValue(); SampleArrayValue copyMetricValue = ((SampleArrayValue) strategy.copy(LocatorUtils.property(locator, "metricValue", sourceMetricValue), sourceMetricValue, (this.metricValue!= null))); copy.setMetricValue(copyMetricValue); } else { if (metricValueShouldBeCopiedAndSet == Boolean.FALSE) { copy.metricValue = null; } } } { Boolean physiologicalRangeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty()))); if (physiologicalRangeShouldBeCopiedAndSet == Boolean.TRUE) { List sourcePhysiologicalRange; sourcePhysiologicalRange = (((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty()))?this.getPhysiologicalRange():null); @SuppressWarnings("unchecked") List copyPhysiologicalRange = ((List ) strategy.copy(LocatorUtils.property(locator, "physiologicalRange", sourcePhysiologicalRange), sourcePhysiologicalRange, ((this.physiologicalRange!= null)&&(!this.physiologicalRange.isEmpty())))); copy.setPhysiologicalRange(copyPhysiologicalRange); } else { if (physiologicalRangeShouldBeCopiedAndSet == Boolean.FALSE) { copy.physiologicalRange = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new RealTimeSampleArrayMetricState(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy