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

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


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

import java.math.BigInteger;
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.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
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.participant.LocalizedTextWidth;


/**
 * 

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 = { "ref", "version", "lang", "textWidth", "numberOfLines" }) @XmlRootElement(name = "GetLocalizedText", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") public class GetLocalizedText extends AbstractGet implements Cloneable, CopyTo, ToString { /** * Zero or more reference names of the texts that are requested. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no Ref ELEMENT given in the request MESSAGE, then all texts are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one Ref ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains all texts that match the Ref ELEMENTs of the msg:GetLocalizedText request MESSAGE. * */ @XmlElement(name = "Ref", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") protected List ref; /** * Revision of the referenced text that is requested. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If the referenced text is not available in the specific version, then msg:GetLocalizedTextResponse/msg:Text is empty. * - If Version is not specified, then msg:GetLocalizedTextResponse contains the latest version of the text in msg:GetLocalizedTextResponse/msg:Text. * */ @XmlElement(name = "Version", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") @XmlSchemaType(name = "unsignedLong") protected BigInteger version; /** * Zero or more language identifiers according to RFC 5646 (see http://tools.ietf.org/html/rfc5646) to get different translations of the requested text. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no Lang ELEMENT given in the request MESSAGE, then all translations are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one Lang ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains translations in all languages matching the Lang ELEMENTs of the msg:GetLocalizedText request MESSAGE. If a text is not available in a specific language, the result for that specific language is omitted. * * NOTE—A set of supported languages is retrievable using msg:GetSupportedLanguages. * */ @XmlElement(name = "Lang", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "language") protected List lang; /** * Zero or more pm:LocalizedTextWidth itentifiers to filter for different text widths. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no TextWidth ELEMENT given in the request MESSAGE, then all text widths are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one TextWidth ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains texts with all text widths matching the TextWidth ELEMENTs of the msg:GetLocalizedText request MESSAGE. Matching in this case means that the number of full width characters in the text is less or equal to the TextWidth ELEMENTs. * */ @XmlElement(name = "TextWidth", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") @XmlSchemaType(name = "string") protected List textWidth; /** * Zero or more numbers to filter for number of lines. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no NumberOfLines ELEMENT given in the request MESSAGE, then all texts independent of the number of lines are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one NumberOfLines ELEMENT given, msg:GetLocalizedTextResponse/msg:Text contains texts that match the number of lines defined by the NumberOfLines ELEMENTs of the msg:GetLocalizedText request MESSAGE. Matching in this case means that the number of lines in the text is less or equal to the NumberOfLines ELEMENTs. * */ @XmlElement(name = "NumberOfLines", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") protected List numberOfLines; /** * Zero or more reference names of the texts that are requested. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no Ref ELEMENT given in the request MESSAGE, then all texts are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one Ref ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains all texts that match the Ref ELEMENTs of the msg:GetLocalizedText request MESSAGE. * * Gets the value of the ref 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 ref property.

* *

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

*
     * getRef().add(newItem);
     * 
* * *

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

* * * @return * The value of the ref property. */ public List getRef() { if (ref == null) { ref = new ArrayList<>(); } return this.ref; } /** * Revision of the referenced text that is requested. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If the referenced text is not available in the specific version, then msg:GetLocalizedTextResponse/msg:Text is empty. * - If Version is not specified, then msg:GetLocalizedTextResponse contains the latest version of the text in msg:GetLocalizedTextResponse/msg:Text. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link BigInteger } * * @see #getVersion() */ public void setVersion(BigInteger value) { this.version = value; } /** * Zero or more language identifiers according to RFC 5646 (see http://tools.ietf.org/html/rfc5646) to get different translations of the requested text. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no Lang ELEMENT given in the request MESSAGE, then all translations are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one Lang ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains translations in all languages matching the Lang ELEMENTs of the msg:GetLocalizedText request MESSAGE. If a text is not available in a specific language, the result for that specific language is omitted. * * NOTE—A set of supported languages is retrievable using msg:GetSupportedLanguages. * * Gets the value of the lang 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 lang property.

* *

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

*
     * getLang().add(newItem);
     * 
* * *

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

* * * @return * The value of the lang property. */ public List getLang() { if (lang == null) { lang = new ArrayList<>(); } return this.lang; } /** * Zero or more pm:LocalizedTextWidth itentifiers to filter for different text widths. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no TextWidth ELEMENT given in the request MESSAGE, then all text widths are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one TextWidth ELEMENT given, then msg:GetLocalizedTextResponse/msg:Text contains texts with all text widths matching the TextWidth ELEMENTs of the msg:GetLocalizedText request MESSAGE. Matching in this case means that the number of full width characters in the text is less or equal to the TextWidth ELEMENTs. * * Gets the value of the textWidth 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 textWidth property.

* *

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

*
     * getTextWidth().add(newItem);
     * 
* * *

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

* * * @return * The value of the textWidth property. */ public List getTextWidth() { if (textWidth == null) { textWidth = new ArrayList<>(); } return this.textWidth; } /** * Zero or more numbers to filter for number of lines. The ELEMENT SHALL have the following impacts on the information conveyed in msg:GetLocalizedTextResponse/msg:Text: * * - If there is no NumberOfLines ELEMENT given in the request MESSAGE, then all texts independent of the number of lines are returned in msg:GetLocalizedTextResponse/msg:Text. * - If there is at least one NumberOfLines ELEMENT given, msg:GetLocalizedTextResponse/msg:Text contains texts that match the number of lines defined by the NumberOfLines ELEMENTs of the msg:GetLocalizedText request MESSAGE. Matching in this case means that the number of lines in the text is less or equal to the NumberOfLines ELEMENTs. * * Gets the value of the numberOfLines 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 numberOfLines property.

* *

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

*
     * getNumberOfLines().add(newItem);
     * 
* * *

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

* * * @return * The value of the numberOfLines property. */ public List getNumberOfLines() { if (numberOfLines == null) { numberOfLines = new ArrayList<>(); } return this.numberOfLines; } public void setRef(List value) { this.ref = null; if (value!= null) { List draftl = this.getRef(); draftl.addAll(value); } } public void setLang(List value) { this.lang = null; if (value!= null) { List draftl = this.getLang(); draftl.addAll(value); } } public void setTextWidth(List value) { this.textWidth = null; if (value!= null) { List draftl = this.getTextWidth(); draftl.addAll(value); } } public void setNumberOfLines(List value) { this.numberOfLines = null; if (value!= null) { List draftl = this.getNumberOfLines(); 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 GetLocalizedText that = ((GetLocalizedText) object); { List leftRef; leftRef = (((this.ref!= null)&&(!this.ref.isEmpty()))?this.getRef():null); List rightRef; rightRef = (((that.ref!= null)&&(!that.ref.isEmpty()))?that.getRef():null); if ((this.ref!= null)&&(!this.ref.isEmpty())) { if ((that.ref!= null)&&(!that.ref.isEmpty())) { if (!leftRef.equals(rightRef)) { return false; } } else { return false; } } else { if ((that.ref!= null)&&(!that.ref.isEmpty())) { return false; } } } { BigInteger leftVersion; leftVersion = this.getVersion(); BigInteger rightVersion; rightVersion = that.getVersion(); if (this.version!= null) { if (that.version!= null) { if (!leftVersion.equals(rightVersion)) { return false; } } else { return false; } } else { if (that.version!= null) { return false; } } } { List leftLang; leftLang = (((this.lang!= null)&&(!this.lang.isEmpty()))?this.getLang():null); List rightLang; rightLang = (((that.lang!= null)&&(!that.lang.isEmpty()))?that.getLang():null); if ((this.lang!= null)&&(!this.lang.isEmpty())) { if ((that.lang!= null)&&(!that.lang.isEmpty())) { if (!leftLang.equals(rightLang)) { return false; } } else { return false; } } else { if ((that.lang!= null)&&(!that.lang.isEmpty())) { return false; } } } { List leftTextWidth; leftTextWidth = (((this.textWidth!= null)&&(!this.textWidth.isEmpty()))?this.getTextWidth():null); List rightTextWidth; rightTextWidth = (((that.textWidth!= null)&&(!that.textWidth.isEmpty()))?that.getTextWidth():null); if ((this.textWidth!= null)&&(!this.textWidth.isEmpty())) { if ((that.textWidth!= null)&&(!that.textWidth.isEmpty())) { if (!leftTextWidth.equals(rightTextWidth)) { return false; } } else { return false; } } else { if ((that.textWidth!= null)&&(!that.textWidth.isEmpty())) { return false; } } } { List leftNumberOfLines; leftNumberOfLines = (((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty()))?this.getNumberOfLines():null); List rightNumberOfLines; rightNumberOfLines = (((that.numberOfLines!= null)&&(!that.numberOfLines.isEmpty()))?that.getNumberOfLines():null); if ((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty())) { if ((that.numberOfLines!= null)&&(!that.numberOfLines.isEmpty())) { if (!leftNumberOfLines.equals(rightNumberOfLines)) { return false; } } else { return false; } } else { if ((that.numberOfLines!= null)&&(!that.numberOfLines.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); List theRef; theRef = (((this.ref!= null)&&(!this.ref.isEmpty()))?this.getRef():null); if ((this.ref!= null)&&(!this.ref.isEmpty())) { currentHashCode += theRef.hashCode(); } } { currentHashCode = (currentHashCode* 31); BigInteger theVersion; theVersion = this.getVersion(); if (this.version!= null) { currentHashCode += theVersion.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theLang; theLang = (((this.lang!= null)&&(!this.lang.isEmpty()))?this.getLang():null); if ((this.lang!= null)&&(!this.lang.isEmpty())) { currentHashCode += theLang.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theTextWidth; theTextWidth = (((this.textWidth!= null)&&(!this.textWidth.isEmpty()))?this.getTextWidth():null); if ((this.textWidth!= null)&&(!this.textWidth.isEmpty())) { currentHashCode += theTextWidth.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theNumberOfLines; theNumberOfLines = (((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty()))?this.getNumberOfLines():null); if ((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty())) { currentHashCode += theNumberOfLines.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 theRef; theRef = (((this.ref!= null)&&(!this.ref.isEmpty()))?this.getRef():null); strategy.appendField(locator, this, "ref", buffer, theRef, ((this.ref!= null)&&(!this.ref.isEmpty()))); } { BigInteger theVersion; theVersion = this.getVersion(); strategy.appendField(locator, this, "version", buffer, theVersion, (this.version!= null)); } { List theLang; theLang = (((this.lang!= null)&&(!this.lang.isEmpty()))?this.getLang():null); strategy.appendField(locator, this, "lang", buffer, theLang, ((this.lang!= null)&&(!this.lang.isEmpty()))); } { List theTextWidth; theTextWidth = (((this.textWidth!= null)&&(!this.textWidth.isEmpty()))?this.getTextWidth():null); strategy.appendField(locator, this, "textWidth", buffer, theTextWidth, ((this.textWidth!= null)&&(!this.textWidth.isEmpty()))); } { List theNumberOfLines; theNumberOfLines = (((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty()))?this.getNumberOfLines():null); strategy.appendField(locator, this, "numberOfLines", buffer, theNumberOfLines, ((this.numberOfLines!= null)&&(!this.numberOfLines.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 GetLocalizedText) { final GetLocalizedText copy = ((GetLocalizedText) draftCopy); { Boolean refShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.ref!= null)&&(!this.ref.isEmpty()))); if (refShouldBeCopiedAndSet == Boolean.TRUE) { List sourceRef; sourceRef = (((this.ref!= null)&&(!this.ref.isEmpty()))?this.getRef():null); @SuppressWarnings("unchecked") List copyRef = ((List ) strategy.copy(LocatorUtils.property(locator, "ref", sourceRef), sourceRef, ((this.ref!= null)&&(!this.ref.isEmpty())))); copy.setRef(copyRef); } else { if (refShouldBeCopiedAndSet == Boolean.FALSE) { copy.ref = null; } } } { Boolean versionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.version!= null)); if (versionShouldBeCopiedAndSet == Boolean.TRUE) { BigInteger sourceVersion; sourceVersion = this.getVersion(); BigInteger copyVersion = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "version", sourceVersion), sourceVersion, (this.version!= null))); copy.setVersion(copyVersion); } else { if (versionShouldBeCopiedAndSet == Boolean.FALSE) { copy.version = null; } } } { Boolean langShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.lang!= null)&&(!this.lang.isEmpty()))); if (langShouldBeCopiedAndSet == Boolean.TRUE) { List sourceLang; sourceLang = (((this.lang!= null)&&(!this.lang.isEmpty()))?this.getLang():null); @SuppressWarnings("unchecked") List copyLang = ((List ) strategy.copy(LocatorUtils.property(locator, "lang", sourceLang), sourceLang, ((this.lang!= null)&&(!this.lang.isEmpty())))); copy.setLang(copyLang); } else { if (langShouldBeCopiedAndSet == Boolean.FALSE) { copy.lang = null; } } } { Boolean textWidthShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.textWidth!= null)&&(!this.textWidth.isEmpty()))); if (textWidthShouldBeCopiedAndSet == Boolean.TRUE) { List sourceTextWidth; sourceTextWidth = (((this.textWidth!= null)&&(!this.textWidth.isEmpty()))?this.getTextWidth():null); @SuppressWarnings("unchecked") List copyTextWidth = ((List ) strategy.copy(LocatorUtils.property(locator, "textWidth", sourceTextWidth), sourceTextWidth, ((this.textWidth!= null)&&(!this.textWidth.isEmpty())))); copy.setTextWidth(copyTextWidth); } else { if (textWidthShouldBeCopiedAndSet == Boolean.FALSE) { copy.textWidth = null; } } } { Boolean numberOfLinesShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty()))); if (numberOfLinesShouldBeCopiedAndSet == Boolean.TRUE) { List sourceNumberOfLines; sourceNumberOfLines = (((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty()))?this.getNumberOfLines():null); @SuppressWarnings("unchecked") List copyNumberOfLines = ((List ) strategy.copy(LocatorUtils.property(locator, "numberOfLines", sourceNumberOfLines), sourceNumberOfLines, ((this.numberOfLines!= null)&&(!this.numberOfLines.isEmpty())))); copy.setNumberOfLines(copyNumberOfLines); } else { if (numberOfLinesShouldBeCopiedAndSet == Boolean.FALSE) { copy.numberOfLines = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new GetLocalizedText(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy