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

org.somda.sdc.biceps.model.message.GetContextStatesByIdentification Maven / Gradle / Ivy


package org.somda.sdc.biceps.model.message;

import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
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.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.InstanceIdentifier;


/**
 * 

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 = { "identification" }) @XmlRootElement(name = "GetContextStatesByIdentification", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") public class GetContextStatesByIdentification extends AbstractGet implements Cloneable, CopyTo, ToString { /** * List of pm:InstanceIdentifier ELEMENTs that specify which context states are requested based on their pm:AbstractContextState/pm:Identification. See msg:GetContextStatesByIdentificationResponse/msg:ContextState. * */ @XmlElement(name = "Identification", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") protected List identification; /** * ContextType defines the type of context to return (e.g., pm:LocationContextState or pm:PatientContextState). * */ @XmlAttribute(name = "ContextType") protected QName contextType; /** * List of pm:InstanceIdentifier ELEMENTs that specify which context states are requested based on their pm:AbstractContextState/pm:Identification. See msg:GetContextStatesByIdentificationResponse/msg:ContextState. * * Gets the value of the identification 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 identification property.

* *

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

*
     * getIdentification().add(newItem);
     * 
* * *

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

* * * @return * The value of the identification property. */ public List getIdentification() { if (identification == null) { identification = new ArrayList<>(); } return this.identification; } /** * ContextType defines the type of context to return (e.g., pm:LocationContextState or pm:PatientContextState). * * @return * possible object is * {@link QName } * */ public QName getContextType() { return contextType; } /** * Sets the value of the contextType property. * * @param value * allowed object is * {@link QName } * * @see #getContextType() */ public void setContextType(QName value) { this.contextType = value; } public void setIdentification(List value) { this.identification = null; if (value!= null) { List draftl = this.getIdentification(); 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 GetContextStatesByIdentification that = ((GetContextStatesByIdentification) object); { List leftIdentification; leftIdentification = (((this.identification!= null)&&(!this.identification.isEmpty()))?this.getIdentification():null); List rightIdentification; rightIdentification = (((that.identification!= null)&&(!that.identification.isEmpty()))?that.getIdentification():null); if ((this.identification!= null)&&(!this.identification.isEmpty())) { if ((that.identification!= null)&&(!that.identification.isEmpty())) { if (!leftIdentification.equals(rightIdentification)) { return false; } } else { return false; } } else { if ((that.identification!= null)&&(!that.identification.isEmpty())) { return false; } } } { QName leftContextType; leftContextType = this.getContextType(); QName rightContextType; rightContextType = that.getContextType(); if (this.contextType!= null) { if (that.contextType!= null) { if (!leftContextType.equals(rightContextType)) { return false; } } else { return false; } } else { if (that.contextType!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); List theIdentification; theIdentification = (((this.identification!= null)&&(!this.identification.isEmpty()))?this.getIdentification():null); if ((this.identification!= null)&&(!this.identification.isEmpty())) { currentHashCode += theIdentification.hashCode(); } } { currentHashCode = (currentHashCode* 31); QName theContextType; theContextType = this.getContextType(); if (this.contextType!= null) { currentHashCode += theContextType.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 theIdentification; theIdentification = (((this.identification!= null)&&(!this.identification.isEmpty()))?this.getIdentification():null); strategy.appendField(locator, this, "identification", buffer, theIdentification, ((this.identification!= null)&&(!this.identification.isEmpty()))); } { QName theContextType; theContextType = this.getContextType(); strategy.appendField(locator, this, "contextType", buffer, theContextType, (this.contextType!= 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 GetContextStatesByIdentification) { final GetContextStatesByIdentification copy = ((GetContextStatesByIdentification) draftCopy); { Boolean identificationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.identification!= null)&&(!this.identification.isEmpty()))); if (identificationShouldBeCopiedAndSet == Boolean.TRUE) { List sourceIdentification; sourceIdentification = (((this.identification!= null)&&(!this.identification.isEmpty()))?this.getIdentification():null); @SuppressWarnings("unchecked") List copyIdentification = ((List ) strategy.copy(LocatorUtils.property(locator, "identification", sourceIdentification), sourceIdentification, ((this.identification!= null)&&(!this.identification.isEmpty())))); copy.setIdentification(copyIdentification); } else { if (identificationShouldBeCopiedAndSet == Boolean.FALSE) { copy.identification = null; } } } { Boolean contextTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.contextType!= null)); if (contextTypeShouldBeCopiedAndSet == Boolean.TRUE) { QName sourceContextType; sourceContextType = this.getContextType(); QName copyContextType = ((QName) strategy.copy(LocatorUtils.property(locator, "contextType", sourceContextType), sourceContextType, (this.contextType!= null))); copy.setContextType(copyContextType); } else { if (contextTypeShouldBeCopiedAndSet == Boolean.FALSE) { copy.contextType = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new GetContextStatesByIdentification(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy