// // 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 java.util.ArrayList; import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import net.opengis.gml.v_3_2_1.AbstractFeatureType; import net.opengis.gml.v_3_2_1.GeometryPropertyType; import net.opengis.gml.v_3_2_1.ReferenceType; import org.isotc211._2005.gmd.CIResponsiblePartyPropertyType; 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; /** * A spatial reference system using geographic identifiers type. A spatial reference system using geographic identifiers is comprised of a related set of one or more location types, together with their corresponding geographic identifiers. These location types may be related to each other through aggregation or disaggregation, possibly forming a hierarchy. [ISO 19112:2003 Clause 6.2] For example, countries as defined in ISO 3166-1 or named population centres in a region. * * <p>Java class for SI_SpatialReferenceSystemUsingGeographicIdentifiersType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="SI_SpatialReferenceSystemUsingGeographicIdentifiersType"> * <complexContent> * <extension base="{http://www.opengis.net/gml/3.2}AbstractFeatureType"> * <sequence> * <element name="name" type="{http://www.isotc211.org/19112}LanguageStringType"/> * <element name="domainOfValidity" type="{http://www.opengis.net/gml/3.2}GeometryPropertyType"/> * <element name="theme" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * <element name="overallOwner" type="{http://www.isotc211.org/2005/gmd}CI_ResponsibleParty_PropertyType"/> * <element name="locationType" type="{http://www.opengis.net/gml/3.2}ReferenceType" maxOccurs="unbounded"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SI_SpatialReferenceSystemUsingGeographicIdentifiersType", propOrder = { "name", "domainOfValidity", "theme", "overallOwner", "locationType" }) public class SISpatialReferenceSystemUsingGeographicIdentifiersType extends AbstractFeatureType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(required = true) @NotNull(message = "SISpatialReferenceSystemUsingGeographicIdentifiersType.name {javax.validation.constraints.NotNull.message}") @Valid protected LanguageStringType name; @XmlElement(required = true) @NotNull(message = "SISpatialReferenceSystemUsingGeographicIdentifiersType.domainOfValidity {javax.validation.constraints.NotNull.message}") @Valid protected GeometryPropertyType domainOfValidity; @XmlElement(required = true) @XmlSchemaType(name = "anyURI") @NotNull(message = "SISpatialReferenceSystemUsingGeographicIdentifiersType.theme {javax.validation.constraints.NotNull.message}") protected String theme; @XmlElement(required = true) @NotNull(message = "SISpatialReferenceSystemUsingGeographicIdentifiersType.overallOwner {javax.validation.constraints.NotNull.message}") @Valid protected CIResponsiblePartyPropertyType overallOwner; @XmlElement(required = true) @NotNull(message = "SISpatialReferenceSystemUsingGeographicIdentifiersType.locationType {javax.validation.constraints.NotNull.message}") @Size(min = 1) @Valid protected List<ReferenceType> locationType; /** * Gets the value of the name property. * * @return * possible object is * {@link LanguageStringType } * */ public LanguageStringType getNameProperty() { 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 domainOfValidity property. * * @return * possible object is * {@link GeometryPropertyType } * */ public GeometryPropertyType getDomainOfValidity() { return domainOfValidity; } /** * Sets the value of the domainOfValidity property. * * @param value * allowed object is * {@link GeometryPropertyType } * */ public void setDomainOfValidity(GeometryPropertyType value) { this.domainOfValidity = value; } public boolean isSetDomainOfValidity() { return (this.domainOfValidity!= null); } /** * Gets the value of the theme property. * * @return * possible object is * {@link String } * */ public String getTheme() { return theme; } /** * Sets the value of the theme property. * * @param value * allowed object is * {@link String } * */ public void setTheme(String value) { this.theme = value; } public boolean isSetTheme() { return (this.theme!= null); } /** * Gets the value of the overallOwner property. * * @return * possible object is * {@link CIResponsiblePartyPropertyType } * */ public CIResponsiblePartyPropertyType getOverallOwner() { return overallOwner; } /** * Sets the value of the overallOwner property. * * @param value * allowed object is * {@link CIResponsiblePartyPropertyType } * */ public void setOverallOwner(CIResponsiblePartyPropertyType value) { this.overallOwner = value; } public boolean isSetOverallOwner() { return (this.overallOwner!= null); } /** * Gets the value of the locationType 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 locationType property. * * <p> * For example, to add a new item, do as follows: * <pre> * getLocationType().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ReferenceType } * * */ public List<ReferenceType> getLocationType() { if (locationType == null) { locationType = new ArrayList<ReferenceType>(); } return this.locationType; } public boolean isSetLocationType() { return ((this.locationType!= null)&&(!this.locationType.isEmpty())); } public void unsetLocationType() { this.locationType = 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) { super.appendFields(locator, buffer, strategy); { LanguageStringType theName; theName = this.getNameProperty(); strategy.appendField(locator, this, "name", buffer, theName, this.isSetName()); } { GeometryPropertyType theDomainOfValidity; theDomainOfValidity = this.getDomainOfValidity(); strategy.appendField(locator, this, "domainOfValidity", buffer, theDomainOfValidity, this.isSetDomainOfValidity()); } { String theTheme; theTheme = this.getTheme(); strategy.appendField(locator, this, "theme", buffer, theTheme, this.isSetTheme()); } { CIResponsiblePartyPropertyType theOverallOwner; theOverallOwner = this.getOverallOwner(); strategy.appendField(locator, this, "overallOwner", buffer, theOverallOwner, this.isSetOverallOwner()); } { List<ReferenceType> theLocationType; theLocationType = (this.isSetLocationType()?this.getLocationType():null); strategy.appendField(locator, this, "locationType", buffer, theLocationType, this.isSetLocationType()); } 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; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final SISpatialReferenceSystemUsingGeographicIdentifiersType that = ((SISpatialReferenceSystemUsingGeographicIdentifiersType) object); { LanguageStringType lhsName; lhsName = this.getNameProperty(); LanguageStringType rhsName; rhsName = that.getNameProperty(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, this.isSetName(), that.isSetName())) { return false; } } { GeometryPropertyType lhsDomainOfValidity; lhsDomainOfValidity = this.getDomainOfValidity(); GeometryPropertyType rhsDomainOfValidity; rhsDomainOfValidity = that.getDomainOfValidity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "domainOfValidity", lhsDomainOfValidity), LocatorUtils.property(thatLocator, "domainOfValidity", rhsDomainOfValidity), lhsDomainOfValidity, rhsDomainOfValidity, this.isSetDomainOfValidity(), that.isSetDomainOfValidity())) { return false; } } { String lhsTheme; lhsTheme = this.getTheme(); String rhsTheme; rhsTheme = that.getTheme(); if (!strategy.equals(LocatorUtils.property(thisLocator, "theme", lhsTheme), LocatorUtils.property(thatLocator, "theme", rhsTheme), lhsTheme, rhsTheme, this.isSetTheme(), that.isSetTheme())) { return false; } } { CIResponsiblePartyPropertyType lhsOverallOwner; lhsOverallOwner = this.getOverallOwner(); CIResponsiblePartyPropertyType rhsOverallOwner; rhsOverallOwner = that.getOverallOwner(); if (!strategy.equals(LocatorUtils.property(thisLocator, "overallOwner", lhsOverallOwner), LocatorUtils.property(thatLocator, "overallOwner", rhsOverallOwner), lhsOverallOwner, rhsOverallOwner, this.isSetOverallOwner(), that.isSetOverallOwner())) { return false; } } { List<ReferenceType> lhsLocationType; lhsLocationType = (this.isSetLocationType()?this.getLocationType():null); List<ReferenceType> rhsLocationType; rhsLocationType = (that.isSetLocationType()?that.getLocationType():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "locationType", lhsLocationType), LocatorUtils.property(thatLocator, "locationType", rhsLocationType), lhsLocationType, rhsLocationType, this.isSetLocationType(), that.isSetLocationType())) { 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 = super.hashCode(locator, strategy); { LanguageStringType theName; theName = this.getNameProperty(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, this.isSetName()); } { GeometryPropertyType theDomainOfValidity; theDomainOfValidity = this.getDomainOfValidity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "domainOfValidity", theDomainOfValidity), currentHashCode, theDomainOfValidity, this.isSetDomainOfValidity()); } { String theTheme; theTheme = this.getTheme(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "theme", theTheme), currentHashCode, theTheme, this.isSetTheme()); } { CIResponsiblePartyPropertyType theOverallOwner; theOverallOwner = this.getOverallOwner(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "overallOwner", theOverallOwner), currentHashCode, theOverallOwner, this.isSetOverallOwner()); } { List<ReferenceType> theLocationType; theLocationType = (this.isSetLocationType()?this.getLocationType():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "locationType", theLocationType), currentHashCode, theLocationType, this.isSetLocationType()); } 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); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof SISpatialReferenceSystemUsingGeographicIdentifiersType) { final SISpatialReferenceSystemUsingGeographicIdentifiersType copy = ((SISpatialReferenceSystemUsingGeographicIdentifiersType) draftCopy); { Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetName()); if (nameShouldBeCopiedAndSet == Boolean.TRUE) { LanguageStringType sourceName; sourceName = this.getNameProperty(); 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 domainOfValidityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDomainOfValidity()); if (domainOfValidityShouldBeCopiedAndSet == Boolean.TRUE) { GeometryPropertyType sourceDomainOfValidity; sourceDomainOfValidity = this.getDomainOfValidity(); GeometryPropertyType copyDomainOfValidity = ((GeometryPropertyType) strategy.copy(LocatorUtils.property(locator, "domainOfValidity", sourceDomainOfValidity), sourceDomainOfValidity, this.isSetDomainOfValidity())); copy.setDomainOfValidity(copyDomainOfValidity); } else { if (domainOfValidityShouldBeCopiedAndSet == Boolean.FALSE) { copy.domainOfValidity = null; } } } { Boolean themeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTheme()); if (themeShouldBeCopiedAndSet == Boolean.TRUE) { String sourceTheme; sourceTheme = this.getTheme(); String copyTheme = ((String) strategy.copy(LocatorUtils.property(locator, "theme", sourceTheme), sourceTheme, this.isSetTheme())); copy.setTheme(copyTheme); } else { if (themeShouldBeCopiedAndSet == Boolean.FALSE) { copy.theme = null; } } } { Boolean overallOwnerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetOverallOwner()); if (overallOwnerShouldBeCopiedAndSet == Boolean.TRUE) { CIResponsiblePartyPropertyType sourceOverallOwner; sourceOverallOwner = this.getOverallOwner(); CIResponsiblePartyPropertyType copyOverallOwner = ((CIResponsiblePartyPropertyType) strategy.copy(LocatorUtils.property(locator, "overallOwner", sourceOverallOwner), sourceOverallOwner, this.isSetOverallOwner())); copy.setOverallOwner(copyOverallOwner); } else { if (overallOwnerShouldBeCopiedAndSet == Boolean.FALSE) { copy.overallOwner = null; } } } { Boolean locationTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetLocationType()); if (locationTypeShouldBeCopiedAndSet == Boolean.TRUE) { List<ReferenceType> sourceLocationType; sourceLocationType = (this.isSetLocationType()?this.getLocationType():null); @SuppressWarnings("unchecked") List<ReferenceType> copyLocationType = ((List<ReferenceType> ) strategy.copy(LocatorUtils.property(locator, "locationType", sourceLocationType), sourceLocationType, this.isSetLocationType())); copy.unsetLocationType(); if (copyLocationType!= null) { List<ReferenceType> uniqueLocationTypel = copy.getLocationType(); uniqueLocationTypel.addAll(copyLocationType); } } else { if (locationTypeShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetLocationType(); } } } } return draftCopy; } public Object createNewInstance() { return new SISpatialReferenceSystemUsingGeographicIdentifiersType(); } 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) { super.mergeFrom(leftLocator, rightLocator, left, right, strategy); if (right instanceof SISpatialReferenceSystemUsingGeographicIdentifiersType) { final SISpatialReferenceSystemUsingGeographicIdentifiersType target = this; final SISpatialReferenceSystemUsingGeographicIdentifiersType leftObject = ((SISpatialReferenceSystemUsingGeographicIdentifiersType) left); final SISpatialReferenceSystemUsingGeographicIdentifiersType rightObject = ((SISpatialReferenceSystemUsingGeographicIdentifiersType) right); { Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetName(), rightObject.isSetName()); if (nameShouldBeMergedAndSet == Boolean.TRUE) { LanguageStringType lhsName; lhsName = leftObject.getNameProperty(); LanguageStringType rhsName; rhsName = rightObject.getNameProperty(); 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 domainOfValidityShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDomainOfValidity(), rightObject.isSetDomainOfValidity()); if (domainOfValidityShouldBeMergedAndSet == Boolean.TRUE) { GeometryPropertyType lhsDomainOfValidity; lhsDomainOfValidity = leftObject.getDomainOfValidity(); GeometryPropertyType rhsDomainOfValidity; rhsDomainOfValidity = rightObject.getDomainOfValidity(); GeometryPropertyType mergedDomainOfValidity = ((GeometryPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "domainOfValidity", lhsDomainOfValidity), LocatorUtils.property(rightLocator, "domainOfValidity", rhsDomainOfValidity), lhsDomainOfValidity, rhsDomainOfValidity, leftObject.isSetDomainOfValidity(), rightObject.isSetDomainOfValidity())); target.setDomainOfValidity(mergedDomainOfValidity); } else { if (domainOfValidityShouldBeMergedAndSet == Boolean.FALSE) { target.domainOfValidity = null; } } } { Boolean themeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTheme(), rightObject.isSetTheme()); if (themeShouldBeMergedAndSet == Boolean.TRUE) { String lhsTheme; lhsTheme = leftObject.getTheme(); String rhsTheme; rhsTheme = rightObject.getTheme(); String mergedTheme = ((String) strategy.merge(LocatorUtils.property(leftLocator, "theme", lhsTheme), LocatorUtils.property(rightLocator, "theme", rhsTheme), lhsTheme, rhsTheme, leftObject.isSetTheme(), rightObject.isSetTheme())); target.setTheme(mergedTheme); } else { if (themeShouldBeMergedAndSet == Boolean.FALSE) { target.theme = null; } } } { Boolean overallOwnerShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetOverallOwner(), rightObject.isSetOverallOwner()); if (overallOwnerShouldBeMergedAndSet == Boolean.TRUE) { CIResponsiblePartyPropertyType lhsOverallOwner; lhsOverallOwner = leftObject.getOverallOwner(); CIResponsiblePartyPropertyType rhsOverallOwner; rhsOverallOwner = rightObject.getOverallOwner(); CIResponsiblePartyPropertyType mergedOverallOwner = ((CIResponsiblePartyPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "overallOwner", lhsOverallOwner), LocatorUtils.property(rightLocator, "overallOwner", rhsOverallOwner), lhsOverallOwner, rhsOverallOwner, leftObject.isSetOverallOwner(), rightObject.isSetOverallOwner())); target.setOverallOwner(mergedOverallOwner); } else { if (overallOwnerShouldBeMergedAndSet == Boolean.FALSE) { target.overallOwner = null; } } } { Boolean locationTypeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetLocationType(), rightObject.isSetLocationType()); if (locationTypeShouldBeMergedAndSet == Boolean.TRUE) { List<ReferenceType> lhsLocationType; lhsLocationType = (leftObject.isSetLocationType()?leftObject.getLocationType():null); List<ReferenceType> rhsLocationType; rhsLocationType = (rightObject.isSetLocationType()?rightObject.getLocationType():null); List<ReferenceType> mergedLocationType = ((List<ReferenceType> ) strategy.merge(LocatorUtils.property(leftLocator, "locationType", lhsLocationType), LocatorUtils.property(rightLocator, "locationType", rhsLocationType), lhsLocationType, rhsLocationType, leftObject.isSetLocationType(), rightObject.isSetLocationType())); target.unsetLocationType(); if (mergedLocationType!= null) { List<ReferenceType> uniqueLocationTypel = target.getLocationType(); uniqueLocationTypel.addAll(mergedLocationType); } } else { if (locationTypeShouldBeMergedAndSet == Boolean.FALSE) { target.unsetLocationType(); } } } } } public void setLocationType(List<ReferenceType> value) { this.locationType = null; if (value!= null) { List<ReferenceType> draftl = this.getLocationType(); draftl.addAll(value); } } }