// // 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._19112; import java.io.Serializable; import javax.validation.Valid; import javax.validation.constraints.NotNull; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; import net.opengis.gml.v_3_2_1.CodeType; 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 anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="partner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="name" type="{http://www.isotc211.org/19112}LanguageStringType"/> * <element name="nameID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="type" type="{http://www.opengis.net/gml/3.2}CodeType" minOccurs="0"/> * <element name="dateCommitted" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/> * <element name="primary" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * <element name="citationCode" type="{http://www.opengis.net/gml/3.2}CodeType" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "partner", "name", "nameID", "type", "dateCommitted", "primary", "citationCode" }) @XmlRootElement(name = "alternativeGeographicIdentifier") public class AlternativeGeographicIdentifier implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; protected String partner; @XmlElement(required = true) @NotNull(message = "AlternativeGeographicIdentifier.name {javax.validation.constraints.NotNull.message}") @Valid protected LanguageStringType name; protected String nameID; @Valid protected CodeType type; @XmlSchemaType(name = "date") protected XMLGregorianCalendar dateCommitted; protected Boolean primary; @Valid protected CodeType citationCode; /** * Gets the value of the partner property. * * @return * possible object is * {@link String } * */ public String getPartner() { return partner; } /** * Sets the value of the partner property. * * @param value * allowed object is * {@link String } * */ public void setPartner(String value) { this.partner = value; } public boolean isSetPartner() { return (this.partner!= null); } /** * Gets the value of the name property. * * @return * possible object is * {@link LanguageStringType } * */ public LanguageStringType getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link LanguageStringType } * */ public void setName(LanguageStringType value) { this.name = value; } public boolean isSetName() { return (this.name!= null); } /** * Gets the value of the nameID property. * * @return * possible object is * {@link String } * */ public String getNameID() { return nameID; } /** * Sets the value of the nameID property. * * @param value * allowed object is * {@link String } * */ public void setNameID(String value) { this.nameID = value; } public boolean isSetNameID() { return (this.nameID!= null); } /** * Gets the value of the type property. * * @return * possible object is * {@link CodeType } * */ public CodeType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link CodeType } * */ public void setType(CodeType value) { this.type = value; } public boolean isSetType() { return (this.type!= null); } /** * Gets the value of the dateCommitted property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateCommitted() { return dateCommitted; } /** * Sets the value of the dateCommitted property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateCommitted(XMLGregorianCalendar value) { this.dateCommitted = value; } public boolean isSetDateCommitted() { return (this.dateCommitted!= null); } /** * Gets the value of the primary property. * * @return * possible object is * {@link Boolean } * */ public Boolean getPrimary() { return primary; } /** * Sets the value of the primary property. * * @param value * allowed object is * {@link Boolean } * */ public void setPrimary(Boolean value) { this.primary = value; } public boolean isSetPrimary() { return (this.primary!= null); } /** * Gets the value of the citationCode property. * * @return * possible object is * {@link CodeType } * */ public CodeType getCitationCode() { return citationCode; } /** * Sets the value of the citationCode property. * * @param value * allowed object is * {@link CodeType } * */ public void setCitationCode(CodeType value) { this.citationCode = value; } public boolean isSetCitationCode() { return (this.citationCode!= 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) { { String thePartner; thePartner = this.getPartner(); strategy.appendField(locator, this, "partner", buffer, thePartner, this.isSetPartner()); } { LanguageStringType theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, this.isSetName()); } { String theNameID; theNameID = this.getNameID(); strategy.appendField(locator, this, "nameID", buffer, theNameID, this.isSetNameID()); } { CodeType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, this.isSetType()); } { XMLGregorianCalendar theDateCommitted; theDateCommitted = this.getDateCommitted(); strategy.appendField(locator, this, "dateCommitted", buffer, theDateCommitted, this.isSetDateCommitted()); } { Boolean thePrimary; thePrimary = this.getPrimary(); strategy.appendField(locator, this, "primary", buffer, thePrimary, this.isSetPrimary()); } { CodeType theCitationCode; theCitationCode = this.getCitationCode(); strategy.appendField(locator, this, "citationCode", buffer, theCitationCode, this.isSetCitationCode()); } 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 AlternativeGeographicIdentifier that = ((AlternativeGeographicIdentifier) object); { String lhsPartner; lhsPartner = this.getPartner(); String rhsPartner; rhsPartner = that.getPartner(); if (!strategy.equals(LocatorUtils.property(thisLocator, "partner", lhsPartner), LocatorUtils.property(thatLocator, "partner", rhsPartner), lhsPartner, rhsPartner, this.isSetPartner(), that.isSetPartner())) { return false; } } { LanguageStringType lhsName; lhsName = this.getName(); LanguageStringType rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, this.isSetName(), that.isSetName())) { return false; } } { String lhsNameID; lhsNameID = this.getNameID(); String rhsNameID; rhsNameID = that.getNameID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "nameID", lhsNameID), LocatorUtils.property(thatLocator, "nameID", rhsNameID), lhsNameID, rhsNameID, this.isSetNameID(), that.isSetNameID())) { return false; } } { CodeType lhsType; lhsType = this.getType(); CodeType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, this.isSetType(), that.isSetType())) { return false; } } { XMLGregorianCalendar lhsDateCommitted; lhsDateCommitted = this.getDateCommitted(); XMLGregorianCalendar rhsDateCommitted; rhsDateCommitted = that.getDateCommitted(); if (!strategy.equals(LocatorUtils.property(thisLocator, "dateCommitted", lhsDateCommitted), LocatorUtils.property(thatLocator, "dateCommitted", rhsDateCommitted), lhsDateCommitted, rhsDateCommitted, this.isSetDateCommitted(), that.isSetDateCommitted())) { return false; } } { Boolean lhsPrimary; lhsPrimary = this.getPrimary(); Boolean rhsPrimary; rhsPrimary = that.getPrimary(); if (!strategy.equals(LocatorUtils.property(thisLocator, "primary", lhsPrimary), LocatorUtils.property(thatLocator, "primary", rhsPrimary), lhsPrimary, rhsPrimary, this.isSetPrimary(), that.isSetPrimary())) { return false; } } { CodeType lhsCitationCode; lhsCitationCode = this.getCitationCode(); CodeType rhsCitationCode; rhsCitationCode = that.getCitationCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "citationCode", lhsCitationCode), LocatorUtils.property(thatLocator, "citationCode", rhsCitationCode), lhsCitationCode, rhsCitationCode, this.isSetCitationCode(), that.isSetCitationCode())) { 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; { String thePartner; thePartner = this.getPartner(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partner", thePartner), currentHashCode, thePartner, this.isSetPartner()); } { LanguageStringType theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, this.isSetName()); } { String theNameID; theNameID = this.getNameID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nameID", theNameID), currentHashCode, theNameID, this.isSetNameID()); } { CodeType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, this.isSetType()); } { XMLGregorianCalendar theDateCommitted; theDateCommitted = this.getDateCommitted(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dateCommitted", theDateCommitted), currentHashCode, theDateCommitted, this.isSetDateCommitted()); } { Boolean thePrimary; thePrimary = this.getPrimary(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "primary", thePrimary), currentHashCode, thePrimary, this.isSetPrimary()); } { CodeType theCitationCode; theCitationCode = this.getCitationCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "citationCode", theCitationCode), currentHashCode, theCitationCode, this.isSetCitationCode()); } 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 AlternativeGeographicIdentifier) { final AlternativeGeographicIdentifier copy = ((AlternativeGeographicIdentifier) draftCopy); { Boolean partnerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetPartner()); if (partnerShouldBeCopiedAndSet == Boolean.TRUE) { String sourcePartner; sourcePartner = this.getPartner(); String copyPartner = ((String) strategy.copy(LocatorUtils.property(locator, "partner", sourcePartner), sourcePartner, this.isSetPartner())); copy.setPartner(copyPartner); } else { if (partnerShouldBeCopiedAndSet == Boolean.FALSE) { copy.partner = null; } } } { Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetName()); if (nameShouldBeCopiedAndSet == Boolean.TRUE) { LanguageStringType sourceName; sourceName = this.getName(); LanguageStringType copyName = ((LanguageStringType) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, this.isSetName())); copy.setName(copyName); } else { if (nameShouldBeCopiedAndSet == Boolean.FALSE) { copy.name = null; } } } { Boolean nameIDShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetNameID()); if (nameIDShouldBeCopiedAndSet == Boolean.TRUE) { String sourceNameID; sourceNameID = this.getNameID(); String copyNameID = ((String) strategy.copy(LocatorUtils.property(locator, "nameID", sourceNameID), sourceNameID, this.isSetNameID())); copy.setNameID(copyNameID); } else { if (nameIDShouldBeCopiedAndSet == Boolean.FALSE) { copy.nameID = null; } } } { Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetType()); if (typeShouldBeCopiedAndSet == Boolean.TRUE) { CodeType sourceType; sourceType = this.getType(); CodeType copyType = ((CodeType) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, this.isSetType())); copy.setType(copyType); } else { if (typeShouldBeCopiedAndSet == Boolean.FALSE) { copy.type = null; } } } { Boolean dateCommittedShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDateCommitted()); if (dateCommittedShouldBeCopiedAndSet == Boolean.TRUE) { XMLGregorianCalendar sourceDateCommitted; sourceDateCommitted = this.getDateCommitted(); XMLGregorianCalendar copyDateCommitted = ((XMLGregorianCalendar) strategy.copy(LocatorUtils.property(locator, "dateCommitted", sourceDateCommitted), sourceDateCommitted, this.isSetDateCommitted())); copy.setDateCommitted(copyDateCommitted); } else { if (dateCommittedShouldBeCopiedAndSet == Boolean.FALSE) { copy.dateCommitted = null; } } } { Boolean primaryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetPrimary()); if (primaryShouldBeCopiedAndSet == Boolean.TRUE) { Boolean sourcePrimary; sourcePrimary = this.getPrimary(); Boolean copyPrimary = ((Boolean) strategy.copy(LocatorUtils.property(locator, "primary", sourcePrimary), sourcePrimary, this.isSetPrimary())); copy.setPrimary(copyPrimary); } else { if (primaryShouldBeCopiedAndSet == Boolean.FALSE) { copy.primary = null; } } } { Boolean citationCodeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetCitationCode()); if (citationCodeShouldBeCopiedAndSet == Boolean.TRUE) { CodeType sourceCitationCode; sourceCitationCode = this.getCitationCode(); CodeType copyCitationCode = ((CodeType) strategy.copy(LocatorUtils.property(locator, "citationCode", sourceCitationCode), sourceCitationCode, this.isSetCitationCode())); copy.setCitationCode(copyCitationCode); } else { if (citationCodeShouldBeCopiedAndSet == Boolean.FALSE) { copy.citationCode = null; } } } } return draftCopy; } public Object createNewInstance() { return new AlternativeGeographicIdentifier(); } 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 AlternativeGeographicIdentifier) { final AlternativeGeographicIdentifier target = this; final AlternativeGeographicIdentifier leftObject = ((AlternativeGeographicIdentifier) left); final AlternativeGeographicIdentifier rightObject = ((AlternativeGeographicIdentifier) right); { Boolean partnerShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetPartner(), rightObject.isSetPartner()); if (partnerShouldBeMergedAndSet == Boolean.TRUE) { String lhsPartner; lhsPartner = leftObject.getPartner(); String rhsPartner; rhsPartner = rightObject.getPartner(); String mergedPartner = ((String) strategy.merge(LocatorUtils.property(leftLocator, "partner", lhsPartner), LocatorUtils.property(rightLocator, "partner", rhsPartner), lhsPartner, rhsPartner, leftObject.isSetPartner(), rightObject.isSetPartner())); target.setPartner(mergedPartner); } else { if (partnerShouldBeMergedAndSet == Boolean.FALSE) { target.partner = null; } } } { Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetName(), rightObject.isSetName()); if (nameShouldBeMergedAndSet == Boolean.TRUE) { LanguageStringType lhsName; lhsName = leftObject.getName(); LanguageStringType rhsName; rhsName = rightObject.getName(); LanguageStringType mergedName = ((LanguageStringType) strategy.merge(LocatorUtils.property(leftLocator, "name", lhsName), LocatorUtils.property(rightLocator, "name", rhsName), lhsName, rhsName, leftObject.isSetName(), rightObject.isSetName())); target.setName(mergedName); } else { if (nameShouldBeMergedAndSet == Boolean.FALSE) { target.name = null; } } } { Boolean nameIDShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetNameID(), rightObject.isSetNameID()); if (nameIDShouldBeMergedAndSet == Boolean.TRUE) { String lhsNameID; lhsNameID = leftObject.getNameID(); String rhsNameID; rhsNameID = rightObject.getNameID(); String mergedNameID = ((String) strategy.merge(LocatorUtils.property(leftLocator, "nameID", lhsNameID), LocatorUtils.property(rightLocator, "nameID", rhsNameID), lhsNameID, rhsNameID, leftObject.isSetNameID(), rightObject.isSetNameID())); target.setNameID(mergedNameID); } else { if (nameIDShouldBeMergedAndSet == Boolean.FALSE) { target.nameID = null; } } } { Boolean typeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetType(), rightObject.isSetType()); if (typeShouldBeMergedAndSet == Boolean.TRUE) { CodeType lhsType; lhsType = leftObject.getType(); CodeType rhsType; rhsType = rightObject.getType(); CodeType mergedType = ((CodeType) strategy.merge(LocatorUtils.property(leftLocator, "type", lhsType), LocatorUtils.property(rightLocator, "type", rhsType), lhsType, rhsType, leftObject.isSetType(), rightObject.isSetType())); target.setType(mergedType); } else { if (typeShouldBeMergedAndSet == Boolean.FALSE) { target.type = null; } } } { Boolean dateCommittedShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDateCommitted(), rightObject.isSetDateCommitted()); if (dateCommittedShouldBeMergedAndSet == Boolean.TRUE) { XMLGregorianCalendar lhsDateCommitted; lhsDateCommitted = leftObject.getDateCommitted(); XMLGregorianCalendar rhsDateCommitted; rhsDateCommitted = rightObject.getDateCommitted(); XMLGregorianCalendar mergedDateCommitted = ((XMLGregorianCalendar) strategy.merge(LocatorUtils.property(leftLocator, "dateCommitted", lhsDateCommitted), LocatorUtils.property(rightLocator, "dateCommitted", rhsDateCommitted), lhsDateCommitted, rhsDateCommitted, leftObject.isSetDateCommitted(), rightObject.isSetDateCommitted())); target.setDateCommitted(mergedDateCommitted); } else { if (dateCommittedShouldBeMergedAndSet == Boolean.FALSE) { target.dateCommitted = null; } } } { Boolean primaryShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetPrimary(), rightObject.isSetPrimary()); if (primaryShouldBeMergedAndSet == Boolean.TRUE) { Boolean lhsPrimary; lhsPrimary = leftObject.getPrimary(); Boolean rhsPrimary; rhsPrimary = rightObject.getPrimary(); Boolean mergedPrimary = ((Boolean) strategy.merge(LocatorUtils.property(leftLocator, "primary", lhsPrimary), LocatorUtils.property(rightLocator, "primary", rhsPrimary), lhsPrimary, rhsPrimary, leftObject.isSetPrimary(), rightObject.isSetPrimary())); target.setPrimary(mergedPrimary); } else { if (primaryShouldBeMergedAndSet == Boolean.FALSE) { target.primary = null; } } } { Boolean citationCodeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetCitationCode(), rightObject.isSetCitationCode()); if (citationCodeShouldBeMergedAndSet == Boolean.TRUE) { CodeType lhsCitationCode; lhsCitationCode = leftObject.getCitationCode(); CodeType rhsCitationCode; rhsCitationCode = rightObject.getCitationCode(); CodeType mergedCitationCode = ((CodeType) strategy.merge(LocatorUtils.property(leftLocator, "citationCode", lhsCitationCode), LocatorUtils.property(rightLocator, "citationCode", rhsCitationCode), lhsCitationCode, rhsCitationCode, leftObject.isSetCitationCode(), rightObject.isSetCitationCode())); target.setCitationCode(mergedCitationCode); } else { if (citationCodeShouldBeMergedAndSet == Boolean.FALSE) { target.citationCode = null; } } } } } }