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

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


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

import java.time.Duration;
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.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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.extension.ExtensionType;
import org.somda.sdc.common.model.DurationAdapter;


/**
 * Retrievability provides information on how it is possible to access a state.
 * 
 * 

Java class for RetrievabilityInfo complex type

. * *

The following schema fragment specifies the expected content contained within this class.

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *           
 *         
 *       
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RetrievabilityInfo", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message", propOrder = { "extension" }) public class RetrievabilityInfo implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * The method on how to retrieve a state. * */ @XmlAttribute(name = "Method", required = true) protected RetrievabilityMethod method; /** * The periodicity in which updates can be expected to be communicated as a periodic event. The implied value SHALL be "PT1S". * */ @XmlAttribute(name = "UpdatePeriod") @XmlJavaTypeAdapter(DurationAdapter.class) @XmlSchemaType(name = "duration") protected Duration updatePeriod; /** * Gets the value of the extension property. * * @return * possible object is * {@link ExtensionType } * */ public ExtensionType getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setExtension(ExtensionType value) { this.extension = value; } /** * The method on how to retrieve a state. * * @return * possible object is * {@link RetrievabilityMethod } * */ public RetrievabilityMethod getMethod() { return method; } /** * Sets the value of the method property. * * @param value * allowed object is * {@link RetrievabilityMethod } * * @see #getMethod() */ public void setMethod(RetrievabilityMethod value) { this.method = value; } /** * The periodicity in which updates can be expected to be communicated as a periodic event. The implied value SHALL be "PT1S". * * @return * possible object is * {@link String } * */ public Duration getUpdatePeriod() { return updatePeriod; } /** * Sets the value of the updatePeriod property. * * @param value * allowed object is * {@link String } * * @see #getUpdatePeriod() */ public void setUpdatePeriod(Duration value) { this.updatePeriod = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final RetrievabilityInfo that = ((RetrievabilityInfo) object); { ExtensionType leftExtension; leftExtension = this.getExtension(); ExtensionType rightExtension; rightExtension = that.getExtension(); if (this.extension!= null) { if (that.extension!= null) { if (!leftExtension.equals(rightExtension)) { return false; } } else { return false; } } else { if (that.extension!= null) { return false; } } } { RetrievabilityMethod leftMethod; leftMethod = this.getMethod(); RetrievabilityMethod rightMethod; rightMethod = that.getMethod(); if (this.method!= null) { if (that.method!= null) { if (!leftMethod.equals(rightMethod)) { return false; } } else { return false; } } else { if (that.method!= null) { return false; } } } { Duration leftUpdatePeriod; leftUpdatePeriod = this.getUpdatePeriod(); Duration rightUpdatePeriod; rightUpdatePeriod = that.getUpdatePeriod(); if (this.updatePeriod!= null) { if (that.updatePeriod!= null) { if (!leftUpdatePeriod.equals(rightUpdatePeriod)) { return false; } } else { return false; } } else { if (that.updatePeriod!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); ExtensionType theExtension; theExtension = this.getExtension(); if (this.extension!= null) { currentHashCode += theExtension.hashCode(); } } { currentHashCode = (currentHashCode* 31); RetrievabilityMethod theMethod; theMethod = this.getMethod(); if (this.method!= null) { currentHashCode += theMethod.hashCode(); } } { currentHashCode = (currentHashCode* 31); Duration theUpdatePeriod; theUpdatePeriod = this.getUpdatePeriod(); if (this.updatePeriod!= null) { currentHashCode += theUpdatePeriod.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) { { ExtensionType theExtension; theExtension = this.getExtension(); strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null)); } { RetrievabilityMethod theMethod; theMethod = this.getMethod(); strategy.appendField(locator, this, "method", buffer, theMethod, (this.method!= null)); } { Duration theUpdatePeriod; theUpdatePeriod = this.getUpdatePeriod(); strategy.appendField(locator, this, "updatePeriod", buffer, theUpdatePeriod, (this.updatePeriod!= 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 RetrievabilityInfo) { final RetrievabilityInfo copy = ((RetrievabilityInfo) draftCopy); { Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null)); if (extensionShouldBeCopiedAndSet == Boolean.TRUE) { ExtensionType sourceExtension; sourceExtension = this.getExtension(); ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null))); copy.setExtension(copyExtension); } else { if (extensionShouldBeCopiedAndSet == Boolean.FALSE) { copy.extension = null; } } } { Boolean methodShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.method!= null)); if (methodShouldBeCopiedAndSet == Boolean.TRUE) { RetrievabilityMethod sourceMethod; sourceMethod = this.getMethod(); RetrievabilityMethod copyMethod = ((RetrievabilityMethod) strategy.copy(LocatorUtils.property(locator, "method", sourceMethod), sourceMethod, (this.method!= null))); copy.setMethod(copyMethod); } else { if (methodShouldBeCopiedAndSet == Boolean.FALSE) { copy.method = null; } } } { Boolean updatePeriodShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.updatePeriod!= null)); if (updatePeriodShouldBeCopiedAndSet == Boolean.TRUE) { Duration sourceUpdatePeriod; sourceUpdatePeriod = this.getUpdatePeriod(); Duration copyUpdatePeriod = ((Duration) strategy.copy(LocatorUtils.property(locator, "updatePeriod", sourceUpdatePeriod), sourceUpdatePeriod, (this.updatePeriod!= null))); copy.setUpdatePeriod(copyUpdatePeriod); } else { if (updatePeriodShouldBeCopiedAndSet == Boolean.FALSE) { copy.updatePeriod = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new RetrievabilityInfo(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy