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

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


/**
 * A state of a limit ALERT CONDITION.
 * 
 * 

Java class for LimitAlertConditionState complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *       
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LimitAlertConditionState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "limits" }) public class LimitAlertConditionState extends AlertConditionState implements Cloneable, CopyTo, ToString { /** * Limit values for the pm:LimitAlertConditionState type. * * The unit of the limits in pm:Range SHALL be the unit of the referenced pm:AlertConditionDescriptor/pm:Source. * */ @XmlElement(name = "Limits", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected Range limits; /** * Monitored alert limits of the limit ALERT CONDITION. See pm:AlertConditionMonitoredLimits * * NOTE—If the pm:AlertConditionState/@ActivationState ATTRIBUTE is not set to "On", the presence of the limit ALERT CONDITION is not detected. From a consumer perspective this is equivalent to the case when the pm:AlertConditionState/@ActivationState ATTRIBUTE is "On" and pm:AlertConditionState/@MonitoredAlertLimits is "None". The difference is that in the latter case the source for the ALERT CONDITION is still supervised, but the presence flag is not generated even if the limits are violated. * */ @XmlAttribute(name = "MonitoredAlertLimits", required = true) protected AlertConditionMonitoredLimits monitoredAlertLimits; /** * Indicates if the limits for the limit ALERT CONDITION are adjusted automatically. * * "On": limit is adjusted automatically * "Off": limit is not adjusted automatically * "Psd": limit is temporarily not adjusted automatically * */ @XmlAttribute(name = "AutoLimitActivationState") protected AlertActivation autoLimitActivationState; /** * Limit values for the pm:LimitAlertConditionState type. * * The unit of the limits in pm:Range SHALL be the unit of the referenced pm:AlertConditionDescriptor/pm:Source. * * @return * possible object is * {@link Range } * */ public Range getLimits() { return limits; } /** * Sets the value of the limits property. * * @param value * allowed object is * {@link Range } * * @see #getLimits() */ public void setLimits(Range value) { this.limits = value; } /** * Monitored alert limits of the limit ALERT CONDITION. See pm:AlertConditionMonitoredLimits * * NOTE—If the pm:AlertConditionState/@ActivationState ATTRIBUTE is not set to "On", the presence of the limit ALERT CONDITION is not detected. From a consumer perspective this is equivalent to the case when the pm:AlertConditionState/@ActivationState ATTRIBUTE is "On" and pm:AlertConditionState/@MonitoredAlertLimits is "None". The difference is that in the latter case the source for the ALERT CONDITION is still supervised, but the presence flag is not generated even if the limits are violated. * * @return * possible object is * {@link AlertConditionMonitoredLimits } * */ public AlertConditionMonitoredLimits getMonitoredAlertLimits() { return monitoredAlertLimits; } /** * Sets the value of the monitoredAlertLimits property. * * @param value * allowed object is * {@link AlertConditionMonitoredLimits } * * @see #getMonitoredAlertLimits() */ public void setMonitoredAlertLimits(AlertConditionMonitoredLimits value) { this.monitoredAlertLimits = value; } /** * Indicates if the limits for the limit ALERT CONDITION are adjusted automatically. * * "On": limit is adjusted automatically * "Off": limit is not adjusted automatically * "Psd": limit is temporarily not adjusted automatically * * @return * possible object is * {@link AlertActivation } * */ @Nullable public AlertActivation getAutoLimitActivationState() { return autoLimitActivationState; } /** * Sets the value of the autoLimitActivationState property. * * @param value * allowed object is * {@link AlertActivation } * * @see #getAutoLimitActivationState() */ public void setAutoLimitActivationState( @Nullable AlertActivation value) { this.autoLimitActivationState = 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 LimitAlertConditionState that = ((LimitAlertConditionState) object); { Range leftLimits; leftLimits = this.getLimits(); Range rightLimits; rightLimits = that.getLimits(); if (this.limits!= null) { if (that.limits!= null) { if (!leftLimits.equals(rightLimits)) { return false; } } else { return false; } } else { if (that.limits!= null) { return false; } } } { AlertConditionMonitoredLimits leftMonitoredAlertLimits; leftMonitoredAlertLimits = this.getMonitoredAlertLimits(); AlertConditionMonitoredLimits rightMonitoredAlertLimits; rightMonitoredAlertLimits = that.getMonitoredAlertLimits(); if (this.monitoredAlertLimits!= null) { if (that.monitoredAlertLimits!= null) { if (!leftMonitoredAlertLimits.equals(rightMonitoredAlertLimits)) { return false; } } else { return false; } } else { if (that.monitoredAlertLimits!= null) { return false; } } } { AlertActivation leftAutoLimitActivationState; leftAutoLimitActivationState = this.getAutoLimitActivationState(); AlertActivation rightAutoLimitActivationState; rightAutoLimitActivationState = that.getAutoLimitActivationState(); if (this.autoLimitActivationState!= null) { if (that.autoLimitActivationState!= null) { if (!leftAutoLimitActivationState.equals(rightAutoLimitActivationState)) { return false; } } else { return false; } } else { if (that.autoLimitActivationState!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); Range theLimits; theLimits = this.getLimits(); if (this.limits!= null) { currentHashCode += theLimits.hashCode(); } } { currentHashCode = (currentHashCode* 31); AlertConditionMonitoredLimits theMonitoredAlertLimits; theMonitoredAlertLimits = this.getMonitoredAlertLimits(); if (this.monitoredAlertLimits!= null) { currentHashCode += theMonitoredAlertLimits.hashCode(); } } { currentHashCode = (currentHashCode* 31); AlertActivation theAutoLimitActivationState; theAutoLimitActivationState = this.getAutoLimitActivationState(); if (this.autoLimitActivationState!= null) { currentHashCode += theAutoLimitActivationState.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); { Range theLimits; theLimits = this.getLimits(); strategy.appendField(locator, this, "limits", buffer, theLimits, (this.limits!= null)); } { AlertConditionMonitoredLimits theMonitoredAlertLimits; theMonitoredAlertLimits = this.getMonitoredAlertLimits(); strategy.appendField(locator, this, "monitoredAlertLimits", buffer, theMonitoredAlertLimits, (this.monitoredAlertLimits!= null)); } { AlertActivation theAutoLimitActivationState; theAutoLimitActivationState = this.getAutoLimitActivationState(); strategy.appendField(locator, this, "autoLimitActivationState", buffer, theAutoLimitActivationState, (this.autoLimitActivationState!= 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 LimitAlertConditionState) { final LimitAlertConditionState copy = ((LimitAlertConditionState) draftCopy); { Boolean limitsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.limits!= null)); if (limitsShouldBeCopiedAndSet == Boolean.TRUE) { Range sourceLimits; sourceLimits = this.getLimits(); Range copyLimits = ((Range) strategy.copy(LocatorUtils.property(locator, "limits", sourceLimits), sourceLimits, (this.limits!= null))); copy.setLimits(copyLimits); } else { if (limitsShouldBeCopiedAndSet == Boolean.FALSE) { copy.limits = null; } } } { Boolean monitoredAlertLimitsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.monitoredAlertLimits!= null)); if (monitoredAlertLimitsShouldBeCopiedAndSet == Boolean.TRUE) { AlertConditionMonitoredLimits sourceMonitoredAlertLimits; sourceMonitoredAlertLimits = this.getMonitoredAlertLimits(); AlertConditionMonitoredLimits copyMonitoredAlertLimits = ((AlertConditionMonitoredLimits) strategy.copy(LocatorUtils.property(locator, "monitoredAlertLimits", sourceMonitoredAlertLimits), sourceMonitoredAlertLimits, (this.monitoredAlertLimits!= null))); copy.setMonitoredAlertLimits(copyMonitoredAlertLimits); } else { if (monitoredAlertLimitsShouldBeCopiedAndSet == Boolean.FALSE) { copy.monitoredAlertLimits = null; } } } { Boolean autoLimitActivationStateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.autoLimitActivationState!= null)); if (autoLimitActivationStateShouldBeCopiedAndSet == Boolean.TRUE) { AlertActivation sourceAutoLimitActivationState; sourceAutoLimitActivationState = this.getAutoLimitActivationState(); AlertActivation copyAutoLimitActivationState = ((AlertActivation) strategy.copy(LocatorUtils.property(locator, "autoLimitActivationState", sourceAutoLimitActivationState), sourceAutoLimitActivationState, (this.autoLimitActivationState!= null))); copy.setAutoLimitActivationState(copyAutoLimitActivationState); } else { if (autoLimitActivationStateShouldBeCopiedAndSet == Boolean.FALSE) { copy.autoLimitActivationState = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new LimitAlertConditionState(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy