// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.07.27 at 04:06:37 PM EDT // package org.isotc211._2005.gco; import java.io.Serializable; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.jvnet.jaxb2_commons.lang.CopyStrategy2; import org.jvnet.jaxb2_commons.lang.CopyTo2; import org.jvnet.jaxb2_commons.lang.Equals2; import org.jvnet.jaxb2_commons.lang.EqualsStrategy2; import org.jvnet.jaxb2_commons.lang.HashCode2; import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2; import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBMergeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; import org.jvnet.jaxb2_commons.lang.MergeFrom2; import org.jvnet.jaxb2_commons.lang.MergeStrategy2; import org.jvnet.jaxb2_commons.lang.ToString2; import org.jvnet.jaxb2_commons.lang.ToStringStrategy2; import org.jvnet.jaxb2_commons.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; /** * <p>Java class for Number_PropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="Number_PropertyType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <choice minOccurs="0"> * <element ref="{http://www.isotc211.org/2005/gco}Real"/> * <element ref="{http://www.isotc211.org/2005/gco}Decimal"/> * <element ref="{http://www.isotc211.org/2005/gco}Integer"/> * </choice> * <attribute ref="{http://www.isotc211.org/2005/gco}nilReason"/> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Number_PropertyType", propOrder = { "real", "decimal", "integer" }) public class NumberPropertyType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(name = "Real") protected Double real; @XmlElement(name = "Decimal") protected BigDecimal decimal; @XmlElement(name = "Integer") protected BigInteger integer; @XmlAttribute(name = "nilReason", namespace = "http://www.isotc211.org/2005/gco") protected List<String> nilReason; /** * Gets the value of the real property. * * @return * possible object is * {@link Double } * */ public Double getReal() { return real; } /** * Sets the value of the real property. * * @param value * allowed object is * {@link Double } * */ public void setReal(Double value) { this.real = value; } public boolean isSetReal() { return (this.real!= null); } /** * Gets the value of the decimal property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getDecimal() { return decimal; } /** * Sets the value of the decimal property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setDecimal(BigDecimal value) { this.decimal = value; } public boolean isSetDecimal() { return (this.decimal!= null); } /** * Gets the value of the integer property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getInteger() { return integer; } /** * Sets the value of the integer property. * * @param value * allowed object is * {@link BigInteger } * */ public void setInteger(BigInteger value) { this.integer = value; } public boolean isSetInteger() { return (this.integer!= null); } /** * Gets the value of the nilReason property. * * <p> * 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 <CODE>set</CODE> method for the nilReason property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNilReason().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNilReason() { if (nilReason == null) { nilReason = new ArrayList<String>(); } return this.nilReason; } public boolean isSetNilReason() { return ((this.nilReason!= null)&&(!this.nilReason.isEmpty())); } public void unsetNilReason() { this.nilReason = null; } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { Double theReal; theReal = this.getReal(); strategy.appendField(locator, this, "real", buffer, theReal, this.isSetReal()); } { BigDecimal theDecimal; theDecimal = this.getDecimal(); strategy.appendField(locator, this, "decimal", buffer, theDecimal, this.isSetDecimal()); } { BigInteger theInteger; theInteger = this.getInteger(); strategy.appendField(locator, this, "integer", buffer, theInteger, this.isSetInteger()); } { List<String> theNilReason; theNilReason = (this.isSetNilReason()?this.getNilReason():null); strategy.appendField(locator, this, "nilReason", buffer, theNilReason, this.isSetNilReason()); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final NumberPropertyType that = ((NumberPropertyType) object); { Double lhsReal; lhsReal = this.getReal(); Double rhsReal; rhsReal = that.getReal(); if (!strategy.equals(LocatorUtils.property(thisLocator, "real", lhsReal), LocatorUtils.property(thatLocator, "real", rhsReal), lhsReal, rhsReal, this.isSetReal(), that.isSetReal())) { return false; } } { BigDecimal lhsDecimal; lhsDecimal = this.getDecimal(); BigDecimal rhsDecimal; rhsDecimal = that.getDecimal(); if (!strategy.equals(LocatorUtils.property(thisLocator, "decimal", lhsDecimal), LocatorUtils.property(thatLocator, "decimal", rhsDecimal), lhsDecimal, rhsDecimal, this.isSetDecimal(), that.isSetDecimal())) { return false; } } { BigInteger lhsInteger; lhsInteger = this.getInteger(); BigInteger rhsInteger; rhsInteger = that.getInteger(); if (!strategy.equals(LocatorUtils.property(thisLocator, "integer", lhsInteger), LocatorUtils.property(thatLocator, "integer", rhsInteger), lhsInteger, rhsInteger, this.isSetInteger(), that.isSetInteger())) { return false; } } { List<String> lhsNilReason; lhsNilReason = (this.isSetNilReason()?this.getNilReason():null); List<String> rhsNilReason; rhsNilReason = (that.isSetNilReason()?that.getNilReason():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "nilReason", lhsNilReason), LocatorUtils.property(thatLocator, "nilReason", rhsNilReason), lhsNilReason, rhsNilReason, this.isSetNilReason(), that.isSetNilReason())) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { Double theReal; theReal = this.getReal(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "real", theReal), currentHashCode, theReal, this.isSetReal()); } { BigDecimal theDecimal; theDecimal = this.getDecimal(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "decimal", theDecimal), currentHashCode, theDecimal, this.isSetDecimal()); } { BigInteger theInteger; theInteger = this.getInteger(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "integer", theInteger), currentHashCode, theInteger, this.isSetInteger()); } { List<String> theNilReason; theNilReason = (this.isSetNilReason()?this.getNilReason():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nilReason", theNilReason), currentHashCode, theNilReason, this.isSetNilReason()); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public Object clone() { return copyTo(createNewInstance()); } public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); } public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof NumberPropertyType) { final NumberPropertyType copy = ((NumberPropertyType) draftCopy); { Boolean realShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetReal()); if (realShouldBeCopiedAndSet == Boolean.TRUE) { Double sourceReal; sourceReal = this.getReal(); Double copyReal = ((Double) strategy.copy(LocatorUtils.property(locator, "real", sourceReal), sourceReal, this.isSetReal())); copy.setReal(copyReal); } else { if (realShouldBeCopiedAndSet == Boolean.FALSE) { copy.real = null; } } } { Boolean decimalShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDecimal()); if (decimalShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourceDecimal; sourceDecimal = this.getDecimal(); BigDecimal copyDecimal = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "decimal", sourceDecimal), sourceDecimal, this.isSetDecimal())); copy.setDecimal(copyDecimal); } else { if (decimalShouldBeCopiedAndSet == Boolean.FALSE) { copy.decimal = null; } } } { Boolean integerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetInteger()); if (integerShouldBeCopiedAndSet == Boolean.TRUE) { BigInteger sourceInteger; sourceInteger = this.getInteger(); BigInteger copyInteger = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "integer", sourceInteger), sourceInteger, this.isSetInteger())); copy.setInteger(copyInteger); } else { if (integerShouldBeCopiedAndSet == Boolean.FALSE) { copy.integer = null; } } } { Boolean nilReasonShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetNilReason()); if (nilReasonShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceNilReason; sourceNilReason = (this.isSetNilReason()?this.getNilReason():null); @SuppressWarnings("unchecked") List<String> copyNilReason = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "nilReason", sourceNilReason), sourceNilReason, this.isSetNilReason())); copy.unsetNilReason(); if (copyNilReason!= null) { List<String> uniqueNilReasonl = copy.getNilReason(); uniqueNilReasonl.addAll(copyNilReason); } } else { if (nilReasonShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetNilReason(); } } } } return draftCopy; } public Object createNewInstance() { return new NumberPropertyType(); } public void mergeFrom(Object left, Object right) { final MergeStrategy2 strategy = JAXBMergeStrategy.INSTANCE; mergeFrom(null, null, left, right, strategy); } public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy2 strategy) { if (right instanceof NumberPropertyType) { final NumberPropertyType target = this; final NumberPropertyType leftObject = ((NumberPropertyType) left); final NumberPropertyType rightObject = ((NumberPropertyType) right); { Boolean realShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetReal(), rightObject.isSetReal()); if (realShouldBeMergedAndSet == Boolean.TRUE) { Double lhsReal; lhsReal = leftObject.getReal(); Double rhsReal; rhsReal = rightObject.getReal(); Double mergedReal = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "real", lhsReal), LocatorUtils.property(rightLocator, "real", rhsReal), lhsReal, rhsReal, leftObject.isSetReal(), rightObject.isSetReal())); target.setReal(mergedReal); } else { if (realShouldBeMergedAndSet == Boolean.FALSE) { target.real = null; } } } { Boolean decimalShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDecimal(), rightObject.isSetDecimal()); if (decimalShouldBeMergedAndSet == Boolean.TRUE) { BigDecimal lhsDecimal; lhsDecimal = leftObject.getDecimal(); BigDecimal rhsDecimal; rhsDecimal = rightObject.getDecimal(); BigDecimal mergedDecimal = ((BigDecimal) strategy.merge(LocatorUtils.property(leftLocator, "decimal", lhsDecimal), LocatorUtils.property(rightLocator, "decimal", rhsDecimal), lhsDecimal, rhsDecimal, leftObject.isSetDecimal(), rightObject.isSetDecimal())); target.setDecimal(mergedDecimal); } else { if (decimalShouldBeMergedAndSet == Boolean.FALSE) { target.decimal = null; } } } { Boolean integerShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetInteger(), rightObject.isSetInteger()); if (integerShouldBeMergedAndSet == Boolean.TRUE) { BigInteger lhsInteger; lhsInteger = leftObject.getInteger(); BigInteger rhsInteger; rhsInteger = rightObject.getInteger(); BigInteger mergedInteger = ((BigInteger) strategy.merge(LocatorUtils.property(leftLocator, "integer", lhsInteger), LocatorUtils.property(rightLocator, "integer", rhsInteger), lhsInteger, rhsInteger, leftObject.isSetInteger(), rightObject.isSetInteger())); target.setInteger(mergedInteger); } else { if (integerShouldBeMergedAndSet == Boolean.FALSE) { target.integer = null; } } } { Boolean nilReasonShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetNilReason(), rightObject.isSetNilReason()); if (nilReasonShouldBeMergedAndSet == Boolean.TRUE) { List<String> lhsNilReason; lhsNilReason = (leftObject.isSetNilReason()?leftObject.getNilReason():null); List<String> rhsNilReason; rhsNilReason = (rightObject.isSetNilReason()?rightObject.getNilReason():null); List<String> mergedNilReason = ((List<String> ) strategy.merge(LocatorUtils.property(leftLocator, "nilReason", lhsNilReason), LocatorUtils.property(rightLocator, "nilReason", rhsNilReason), lhsNilReason, rhsNilReason, leftObject.isSetNilReason(), rightObject.isSetNilReason())); target.unsetNilReason(); if (mergedNilReason!= null) { List<String> uniqueNilReasonl = target.getNilReason(); uniqueNilReasonl.addAll(mergedNilReason); } } else { if (nilReasonShouldBeMergedAndSet == Boolean.FALSE) { target.unsetNilReason(); } } } } } public void setNilReason(List<String> value) { this.nilReason = null; if (value!= null) { List<String> draftl = this.getNilReason(); draftl.addAll(value); } } }