org.somda.sdc.biceps.model.participant.SystemSignalActivation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps-model Show documentation
Show all versions of biceps-model Show documentation
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.XmlType;
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;
/**
* Defines a tuple consisting of an pm:AlertSignalManifestation and an pm:AlertActivation to describe the alert activation state of a certain ALERT SIGNAL manifestation.
*
* Example: ./@Manifestation is "Aud" and ./@State is "Psd" means that any audible alert activation is paused.
*
* Java class for SystemSignalActivation complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SystemSignalActivation", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
public class SystemSignalActivation implements Cloneable, CopyTo, ToString
{
/**
* See pm:AlertSignalManifestation.
*
*/
@XmlAttribute(name = "Manifestation", required = true)
protected AlertSignalManifestation manifestation;
/**
* See pm:AlertActivation.
*
*/
@XmlAttribute(name = "State", required = true)
protected AlertActivation state;
/**
* See pm:AlertSignalManifestation.
*
* @return
* possible object is
* {@link AlertSignalManifestation }
*
*/
public AlertSignalManifestation getManifestation() {
return manifestation;
}
/**
* Sets the value of the manifestation property.
*
* @param value
* allowed object is
* {@link AlertSignalManifestation }
*
* @see #getManifestation()
*/
public void setManifestation(AlertSignalManifestation value) {
this.manifestation = value;
}
/**
* See pm:AlertActivation.
*
* @return
* possible object is
* {@link AlertActivation }
*
*/
public AlertActivation getState() {
return state;
}
/**
* Sets the value of the state property.
*
* @param value
* allowed object is
* {@link AlertActivation }
*
* @see #getState()
*/
public void setState(AlertActivation value) {
this.state = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final SystemSignalActivation that = ((SystemSignalActivation) object);
{
AlertSignalManifestation leftManifestation;
leftManifestation = this.getManifestation();
AlertSignalManifestation rightManifestation;
rightManifestation = that.getManifestation();
if (this.manifestation!= null) {
if (that.manifestation!= null) {
if (!leftManifestation.equals(rightManifestation)) {
return false;
}
} else {
return false;
}
} else {
if (that.manifestation!= null) {
return false;
}
}
}
{
AlertActivation leftState;
leftState = this.getState();
AlertActivation rightState;
rightState = that.getState();
if (this.state!= null) {
if (that.state!= null) {
if (!leftState.equals(rightState)) {
return false;
}
} else {
return false;
}
} else {
if (that.state!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
AlertSignalManifestation theManifestation;
theManifestation = this.getManifestation();
if (this.manifestation!= null) {
currentHashCode += theManifestation.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
AlertActivation theState;
theState = this.getState();
if (this.state!= null) {
currentHashCode += theState.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) {
{
AlertSignalManifestation theManifestation;
theManifestation = this.getManifestation();
strategy.appendField(locator, this, "manifestation", buffer, theManifestation, (this.manifestation!= null));
}
{
AlertActivation theState;
theState = this.getState();
strategy.appendField(locator, this, "state", buffer, theState, (this.state!= 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 SystemSignalActivation) {
final SystemSignalActivation copy = ((SystemSignalActivation) draftCopy);
{
Boolean manifestationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.manifestation!= null));
if (manifestationShouldBeCopiedAndSet == Boolean.TRUE) {
AlertSignalManifestation sourceManifestation;
sourceManifestation = this.getManifestation();
AlertSignalManifestation copyManifestation = ((AlertSignalManifestation) strategy.copy(LocatorUtils.property(locator, "manifestation", sourceManifestation), sourceManifestation, (this.manifestation!= null)));
copy.setManifestation(copyManifestation);
} else {
if (manifestationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.manifestation = null;
}
}
}
{
Boolean stateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.state!= null));
if (stateShouldBeCopiedAndSet == Boolean.TRUE) {
AlertActivation sourceState;
sourceState = this.getState();
AlertActivation copyState = ((AlertActivation) strategy.copy(LocatorUtils.property(locator, "state", sourceState), sourceState, (this.state!= null)));
copy.setState(copyState);
} else {
if (stateShouldBeCopiedAndSet == Boolean.FALSE) {
copy.state = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new SystemSignalActivation();
}
}