org.somda.sdc.biceps.model.message.GetStatesFromArchive 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.message;
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.XmlRootElement;
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;
/**
* Java class for anonymous complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"stateRevisions",
"timeFrame",
"handle"
})
@XmlRootElement(name = "GetStatesFromArchive", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
public class GetStatesFromArchive
extends AbstractGet
implements Cloneable, CopyTo, ToString
{
/**
* StateRevisions is a version filter. It designates the referenced state version frame that is requested. By adding this optional ELEMENT to the request, GetStatesFromArchiveResponse SHALL only respond with states matching this version frame.
*
*/
@XmlElement(name = "StateRevisions", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
protected VersionFrame stateRevisions;
/**
* TimeFrame defines a time-based filter. By adding this optional ELEMENT to the request, GetStatesFromArchiveResponse SHALL only respond with states matching this time frame.
*
*/
@XmlElement(name = "TimeFrame", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
protected TimeFrame timeFrame;
/**
* A list of HANDLE references which serve as a filter for the response.
*
* __R5021: If one or more HANDLE references are defined, GetStatesFromArchiveResponse SHALL respond only with states matching these HANDLE references at the given revision and/or time frame.__
*
* __R5022: If no HANDLE references are defined, GetStatesFromArchiveResponse SHALL respond with all states at the given revision and/or time frame.__
*
* __R5023: If a HANDLE is a descriptor HANDLE that points to a multi state, GetStatesFromArchiveResponse SHALL respond with all states referring to the descriptor HANDLE.__
*
*/
@XmlElement(name = "Handle", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
protected List handle;
/**
* StateRevisions is a version filter. It designates the referenced state version frame that is requested. By adding this optional ELEMENT to the request, GetStatesFromArchiveResponse SHALL only respond with states matching this version frame.
*
* @return
* possible object is
* {@link VersionFrame }
*
*/
public VersionFrame getStateRevisions() {
return stateRevisions;
}
/**
* Sets the value of the stateRevisions property.
*
* @param value
* allowed object is
* {@link VersionFrame }
*
* @see #getStateRevisions()
*/
public void setStateRevisions(VersionFrame value) {
this.stateRevisions = value;
}
/**
* TimeFrame defines a time-based filter. By adding this optional ELEMENT to the request, GetStatesFromArchiveResponse SHALL only respond with states matching this time frame.
*
* @return
* possible object is
* {@link TimeFrame }
*
*/
public TimeFrame getTimeFrame() {
return timeFrame;
}
/**
* Sets the value of the timeFrame property.
*
* @param value
* allowed object is
* {@link TimeFrame }
*
* @see #getTimeFrame()
*/
public void setTimeFrame(TimeFrame value) {
this.timeFrame = value;
}
/**
* A list of HANDLE references which serve as a filter for the response.
*
* __R5021: If one or more HANDLE references are defined, GetStatesFromArchiveResponse SHALL respond only with states matching these HANDLE references at the given revision and/or time frame.__
*
* __R5022: If no HANDLE references are defined, GetStatesFromArchiveResponse SHALL respond with all states at the given revision and/or time frame.__
*
* __R5023: If a HANDLE is a descriptor HANDLE that points to a multi state, GetStatesFromArchiveResponse SHALL respond with all states referring to the descriptor HANDLE.__
*
* Gets the value of the handle 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 handle property.
*
*
* For example, to add a new item, do as follows:
*
*
* getHandle().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*
* @return
* The value of the handle property.
*/
public List getHandle() {
if (handle == null) {
handle = new ArrayList<>();
}
return this.handle;
}
public void setHandle(List value) {
this.handle = null;
if (value!= null) {
List draftl = this.getHandle();
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 GetStatesFromArchive that = ((GetStatesFromArchive) object);
{
VersionFrame leftStateRevisions;
leftStateRevisions = this.getStateRevisions();
VersionFrame rightStateRevisions;
rightStateRevisions = that.getStateRevisions();
if (this.stateRevisions!= null) {
if (that.stateRevisions!= null) {
if (!leftStateRevisions.equals(rightStateRevisions)) {
return false;
}
} else {
return false;
}
} else {
if (that.stateRevisions!= null) {
return false;
}
}
}
{
TimeFrame leftTimeFrame;
leftTimeFrame = this.getTimeFrame();
TimeFrame rightTimeFrame;
rightTimeFrame = that.getTimeFrame();
if (this.timeFrame!= null) {
if (that.timeFrame!= null) {
if (!leftTimeFrame.equals(rightTimeFrame)) {
return false;
}
} else {
return false;
}
} else {
if (that.timeFrame!= null) {
return false;
}
}
}
{
List leftHandle;
leftHandle = (((this.handle!= null)&&(!this.handle.isEmpty()))?this.getHandle():null);
List rightHandle;
rightHandle = (((that.handle!= null)&&(!that.handle.isEmpty()))?that.getHandle():null);
if ((this.handle!= null)&&(!this.handle.isEmpty())) {
if ((that.handle!= null)&&(!that.handle.isEmpty())) {
if (!leftHandle.equals(rightHandle)) {
return false;
}
} else {
return false;
}
} else {
if ((that.handle!= null)&&(!that.handle.isEmpty())) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
currentHashCode = ((currentHashCode* 31)+ super.hashCode());
{
currentHashCode = (currentHashCode* 31);
VersionFrame theStateRevisions;
theStateRevisions = this.getStateRevisions();
if (this.stateRevisions!= null) {
currentHashCode += theStateRevisions.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
TimeFrame theTimeFrame;
theTimeFrame = this.getTimeFrame();
if (this.timeFrame!= null) {
currentHashCode += theTimeFrame.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theHandle;
theHandle = (((this.handle!= null)&&(!this.handle.isEmpty()))?this.getHandle():null);
if ((this.handle!= null)&&(!this.handle.isEmpty())) {
currentHashCode += theHandle.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);
{
VersionFrame theStateRevisions;
theStateRevisions = this.getStateRevisions();
strategy.appendField(locator, this, "stateRevisions", buffer, theStateRevisions, (this.stateRevisions!= null));
}
{
TimeFrame theTimeFrame;
theTimeFrame = this.getTimeFrame();
strategy.appendField(locator, this, "timeFrame", buffer, theTimeFrame, (this.timeFrame!= null));
}
{
List theHandle;
theHandle = (((this.handle!= null)&&(!this.handle.isEmpty()))?this.getHandle():null);
strategy.appendField(locator, this, "handle", buffer, theHandle, ((this.handle!= null)&&(!this.handle.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 GetStatesFromArchive) {
final GetStatesFromArchive copy = ((GetStatesFromArchive) draftCopy);
{
Boolean stateRevisionsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.stateRevisions!= null));
if (stateRevisionsShouldBeCopiedAndSet == Boolean.TRUE) {
VersionFrame sourceStateRevisions;
sourceStateRevisions = this.getStateRevisions();
VersionFrame copyStateRevisions = ((VersionFrame) strategy.copy(LocatorUtils.property(locator, "stateRevisions", sourceStateRevisions), sourceStateRevisions, (this.stateRevisions!= null)));
copy.setStateRevisions(copyStateRevisions);
} else {
if (stateRevisionsShouldBeCopiedAndSet == Boolean.FALSE) {
copy.stateRevisions = null;
}
}
}
{
Boolean timeFrameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.timeFrame!= null));
if (timeFrameShouldBeCopiedAndSet == Boolean.TRUE) {
TimeFrame sourceTimeFrame;
sourceTimeFrame = this.getTimeFrame();
TimeFrame copyTimeFrame = ((TimeFrame) strategy.copy(LocatorUtils.property(locator, "timeFrame", sourceTimeFrame), sourceTimeFrame, (this.timeFrame!= null)));
copy.setTimeFrame(copyTimeFrame);
} else {
if (timeFrameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.timeFrame = null;
}
}
}
{
Boolean handleShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.handle!= null)&&(!this.handle.isEmpty())));
if (handleShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceHandle;
sourceHandle = (((this.handle!= null)&&(!this.handle.isEmpty()))?this.getHandle():null);
@SuppressWarnings("unchecked")
List copyHandle = ((List ) strategy.copy(LocatorUtils.property(locator, "handle", sourceHandle), sourceHandle, ((this.handle!= null)&&(!this.handle.isEmpty()))));
copy.setHandle(copyHandle);
} else {
if (handleShouldBeCopiedAndSet == Boolean.FALSE) {
copy.handle = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new GetStatesFromArchive();
}
}