org.somda.sdc.biceps.model.participant.VmdState 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.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;
/**
* The state of a VMD.
*
* Java class for VmdState complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VmdState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = {
"operatingJurisdiction"
})
public class VmdState
extends AbstractComplexDeviceComponentState
implements Cloneable, CopyTo, ToString
{
/**
* The current region information that is configured for the VMD. See also pm:OperatingJurisdiction. OperatingJurisdiction SHALL NOT be inserted if there is no pm:VmdDescriptor/pm:ApprovedJurisdictions list present.
*
*/
@XmlElement(name = "OperatingJurisdiction", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected OperatingJurisdiction operatingJurisdiction;
/**
* The current region information that is configured for the VMD. See also pm:OperatingJurisdiction. OperatingJurisdiction SHALL NOT be inserted if there is no pm:VmdDescriptor/pm:ApprovedJurisdictions list present.
*
* @return
* possible object is
* {@link OperatingJurisdiction }
*
*/
@Nullable
public OperatingJurisdiction getOperatingJurisdiction() {
return operatingJurisdiction;
}
/**
* Sets the value of the operatingJurisdiction property.
*
* @param value
* allowed object is
* {@link OperatingJurisdiction }
*
* @see #getOperatingJurisdiction()
*/
public void setOperatingJurisdiction(
@Nullable
OperatingJurisdiction value) {
this.operatingJurisdiction = 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 VmdState that = ((VmdState) object);
{
OperatingJurisdiction leftOperatingJurisdiction;
leftOperatingJurisdiction = this.getOperatingJurisdiction();
OperatingJurisdiction rightOperatingJurisdiction;
rightOperatingJurisdiction = that.getOperatingJurisdiction();
if (this.operatingJurisdiction!= null) {
if (that.operatingJurisdiction!= null) {
if (!leftOperatingJurisdiction.equals(rightOperatingJurisdiction)) {
return false;
}
} else {
return false;
}
} else {
if (that.operatingJurisdiction!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
currentHashCode = ((currentHashCode* 31)+ super.hashCode());
{
currentHashCode = (currentHashCode* 31);
OperatingJurisdiction theOperatingJurisdiction;
theOperatingJurisdiction = this.getOperatingJurisdiction();
if (this.operatingJurisdiction!= null) {
currentHashCode += theOperatingJurisdiction.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);
{
OperatingJurisdiction theOperatingJurisdiction;
theOperatingJurisdiction = this.getOperatingJurisdiction();
strategy.appendField(locator, this, "operatingJurisdiction", buffer, theOperatingJurisdiction, (this.operatingJurisdiction!= 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 VmdState) {
final VmdState copy = ((VmdState) draftCopy);
{
Boolean operatingJurisdictionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.operatingJurisdiction!= null));
if (operatingJurisdictionShouldBeCopiedAndSet == Boolean.TRUE) {
OperatingJurisdiction sourceOperatingJurisdiction;
sourceOperatingJurisdiction = this.getOperatingJurisdiction();
OperatingJurisdiction copyOperatingJurisdiction = ((OperatingJurisdiction) strategy.copy(LocatorUtils.property(locator, "operatingJurisdiction", sourceOperatingJurisdiction), sourceOperatingJurisdiction, (this.operatingJurisdiction!= null)));
copy.setOperatingJurisdiction(copyOperatingJurisdiction);
} else {
if (operatingJurisdictionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.operatingJurisdiction = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new VmdState();
}
}