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

org.somda.sdc.biceps.model.message.GetContextStatesResponse 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.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;
import org.somda.sdc.biceps.model.participant.AbstractContextState;


/**
 * 

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 = { "contextState" }) @XmlRootElement(name = "GetContextStatesResponse", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") public class GetContextStatesResponse extends AbstractGetResponse implements Cloneable, CopyTo, ToString { /** * ContextState comprises the requested set of context states. * * __R5039: If the msg:GetContextStates/msg:HandleRef list is empty, all context states in the MDIB SHALL be included in the result list.__ * * __R5040: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match a context descriptor HANDLE, then all context states that belong to the corresponding context descriptor SHALL be included in the result list.__ * * __R5041: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match a context state HANDLE, then the corresponding context state SHALL be included in the result list.__ * * __R5042: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match an MDS descriptor, then all context states that are part of this MDS SHALL be included in the result list.__ * */ @XmlElement(name = "ContextState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") protected List contextState; /** * ContextState comprises the requested set of context states. * * __R5039: If the msg:GetContextStates/msg:HandleRef list is empty, all context states in the MDIB SHALL be included in the result list.__ * * __R5040: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match a context descriptor HANDLE, then all context states that belong to the corresponding context descriptor SHALL be included in the result list.__ * * __R5041: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match a context state HANDLE, then the corresponding context state SHALL be included in the result list.__ * * __R5042: If a HANDLE reference from the msg:GetContextStates/msg:HandleRef list does match an MDS descriptor, then all context states that are part of this MDS SHALL be included in the result list.__ * * Gets the value of the contextState 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 contextState property.

* *

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

*
     * getContextState().add(newItem);
     * 
* * *

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

* * * @return * The value of the contextState property. */ public List getContextState() { if (contextState == null) { contextState = new ArrayList<>(); } return this.contextState; } public void setContextState(List value) { this.contextState = null; if (value!= null) { List draftl = this.getContextState(); 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 GetContextStatesResponse that = ((GetContextStatesResponse) object); { List leftContextState; leftContextState = (((this.contextState!= null)&&(!this.contextState.isEmpty()))?this.getContextState():null); List rightContextState; rightContextState = (((that.contextState!= null)&&(!that.contextState.isEmpty()))?that.getContextState():null); if ((this.contextState!= null)&&(!this.contextState.isEmpty())) { if ((that.contextState!= null)&&(!that.contextState.isEmpty())) { if (!leftContextState.equals(rightContextState)) { return false; } } else { return false; } } else { if ((that.contextState!= null)&&(!that.contextState.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); List theContextState; theContextState = (((this.contextState!= null)&&(!this.contextState.isEmpty()))?this.getContextState():null); if ((this.contextState!= null)&&(!this.contextState.isEmpty())) { currentHashCode += theContextState.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); { List theContextState; theContextState = (((this.contextState!= null)&&(!this.contextState.isEmpty()))?this.getContextState():null); strategy.appendField(locator, this, "contextState", buffer, theContextState, ((this.contextState!= null)&&(!this.contextState.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 GetContextStatesResponse) { final GetContextStatesResponse copy = ((GetContextStatesResponse) draftCopy); { Boolean contextStateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.contextState!= null)&&(!this.contextState.isEmpty()))); if (contextStateShouldBeCopiedAndSet == Boolean.TRUE) { List sourceContextState; sourceContextState = (((this.contextState!= null)&&(!this.contextState.isEmpty()))?this.getContextState():null); @SuppressWarnings("unchecked") List copyContextState = ((List ) strategy.copy(LocatorUtils.property(locator, "contextState", sourceContextState), sourceContextState, ((this.contextState!= null)&&(!this.contextState.isEmpty())))); copy.setContextState(copyContextState); } else { if (contextStateShouldBeCopiedAndSet == Boolean.FALSE) { copy.contextState = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new GetContextStatesResponse(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy