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

net.opengis.citygml.v_2_0.AddressType Maven / Gradle / Ivy

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2016.02.26 at 04:41:00 PM AST 
//


package net.opengis.citygml.v_2_0;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import net.opengis.gml.v_3_1_1.AbstractFeatureType;
import net.opengis.gml.v_3_1_1.MultiPointPropertyType;
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;


/**
 * Type for addresses. It references the xAL address standard issued by the OASIS consortium. Please note,
 * 				that addresses are modelled as GML features. Every address can be assigned zero or more 2D or 3D point geometries (one
 * 				gml:MultiPoint geometry) locating the entrance(s). 
 * 
 * 

Java class for AddressType complex type. * *

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

 * <complexType name="AddressType">
 *   <complexContent>
 *     <extension base="{http://www.opengis.net/gml}AbstractFeatureType">
 *       <sequence>
 *         <element name="xalAddress" type="{http://www.opengis.net/citygml/2.0}xalAddressPropertyType"/>
 *         <element name="multiPoint" type="{http://www.opengis.net/gml}MultiPointPropertyType" minOccurs="0"/>
 *         <element ref="{http://www.opengis.net/citygml/2.0}_GenericApplicationPropertyOfAddress" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AddressType", propOrder = { "xalAddress", "multiPoint", "genericApplicationPropertyOfAddress" }) public class AddressType extends AbstractFeatureType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { @XmlElement(required = true) protected XalAddressPropertyType xalAddress; protected MultiPointPropertyType multiPoint; @XmlElement(name = "_GenericApplicationPropertyOfAddress") protected List genericApplicationPropertyOfAddress; /** * Gets the value of the xalAddress property. * * @return * possible object is * {@link XalAddressPropertyType } * */ public XalAddressPropertyType getXalAddress() { return xalAddress; } /** * Sets the value of the xalAddress property. * * @param value * allowed object is * {@link XalAddressPropertyType } * */ public void setXalAddress(XalAddressPropertyType value) { this.xalAddress = value; } public boolean isSetXalAddress() { return (this.xalAddress!= null); } /** * Gets the value of the multiPoint property. * * @return * possible object is * {@link MultiPointPropertyType } * */ public MultiPointPropertyType getMultiPoint() { return multiPoint; } /** * Sets the value of the multiPoint property. * * @param value * allowed object is * {@link MultiPointPropertyType } * */ public void setMultiPoint(MultiPointPropertyType value) { this.multiPoint = value; } public boolean isSetMultiPoint() { return (this.multiPoint!= null); } /** * Gets the value of the genericApplicationPropertyOfAddress 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 genericApplicationPropertyOfAddress property. * *

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

     *    getGenericApplicationPropertyOfAddress().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List getGenericApplicationPropertyOfAddress() { if (genericApplicationPropertyOfAddress == null) { genericApplicationPropertyOfAddress = new ArrayList(); } return this.genericApplicationPropertyOfAddress; } public boolean isSetGenericApplicationPropertyOfAddress() { return ((this.genericApplicationPropertyOfAddress!= null)&&(!this.genericApplicationPropertyOfAddress.isEmpty())); } public void unsetGenericApplicationPropertyOfAddress() { this.genericApplicationPropertyOfAddress = 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); { XalAddressPropertyType theXalAddress; theXalAddress = this.getXalAddress(); strategy.appendField(locator, this, "xalAddress", buffer, theXalAddress, this.isSetXalAddress()); } { MultiPointPropertyType theMultiPoint; theMultiPoint = this.getMultiPoint(); strategy.appendField(locator, this, "multiPoint", buffer, theMultiPoint, this.isSetMultiPoint()); } { List theGenericApplicationPropertyOfAddress; theGenericApplicationPropertyOfAddress = (this.isSetGenericApplicationPropertyOfAddress()?this.getGenericApplicationPropertyOfAddress():null); strategy.appendField(locator, this, "genericApplicationPropertyOfAddress", buffer, theGenericApplicationPropertyOfAddress, this.isSetGenericApplicationPropertyOfAddress()); } 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 AddressType that = ((AddressType) object); { XalAddressPropertyType lhsXalAddress; lhsXalAddress = this.getXalAddress(); XalAddressPropertyType rhsXalAddress; rhsXalAddress = that.getXalAddress(); if (!strategy.equals(LocatorUtils.property(thisLocator, "xalAddress", lhsXalAddress), LocatorUtils.property(thatLocator, "xalAddress", rhsXalAddress), lhsXalAddress, rhsXalAddress, this.isSetXalAddress(), that.isSetXalAddress())) { return false; } } { MultiPointPropertyType lhsMultiPoint; lhsMultiPoint = this.getMultiPoint(); MultiPointPropertyType rhsMultiPoint; rhsMultiPoint = that.getMultiPoint(); if (!strategy.equals(LocatorUtils.property(thisLocator, "multiPoint", lhsMultiPoint), LocatorUtils.property(thatLocator, "multiPoint", rhsMultiPoint), lhsMultiPoint, rhsMultiPoint, this.isSetMultiPoint(), that.isSetMultiPoint())) { return false; } } { List lhsGenericApplicationPropertyOfAddress; lhsGenericApplicationPropertyOfAddress = (this.isSetGenericApplicationPropertyOfAddress()?this.getGenericApplicationPropertyOfAddress():null); List rhsGenericApplicationPropertyOfAddress; rhsGenericApplicationPropertyOfAddress = (that.isSetGenericApplicationPropertyOfAddress()?that.getGenericApplicationPropertyOfAddress():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "genericApplicationPropertyOfAddress", lhsGenericApplicationPropertyOfAddress), LocatorUtils.property(thatLocator, "genericApplicationPropertyOfAddress", rhsGenericApplicationPropertyOfAddress), lhsGenericApplicationPropertyOfAddress, rhsGenericApplicationPropertyOfAddress, this.isSetGenericApplicationPropertyOfAddress(), that.isSetGenericApplicationPropertyOfAddress())) { 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); { XalAddressPropertyType theXalAddress; theXalAddress = this.getXalAddress(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "xalAddress", theXalAddress), currentHashCode, theXalAddress, this.isSetXalAddress()); } { MultiPointPropertyType theMultiPoint; theMultiPoint = this.getMultiPoint(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "multiPoint", theMultiPoint), currentHashCode, theMultiPoint, this.isSetMultiPoint()); } { List theGenericApplicationPropertyOfAddress; theGenericApplicationPropertyOfAddress = (this.isSetGenericApplicationPropertyOfAddress()?this.getGenericApplicationPropertyOfAddress():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "genericApplicationPropertyOfAddress", theGenericApplicationPropertyOfAddress), currentHashCode, theGenericApplicationPropertyOfAddress, this.isSetGenericApplicationPropertyOfAddress()); } 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 AddressType) { final AddressType copy = ((AddressType) draftCopy); { Boolean xalAddressShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetXalAddress()); if (xalAddressShouldBeCopiedAndSet == Boolean.TRUE) { XalAddressPropertyType sourceXalAddress; sourceXalAddress = this.getXalAddress(); XalAddressPropertyType copyXalAddress = ((XalAddressPropertyType) strategy.copy(LocatorUtils.property(locator, "xalAddress", sourceXalAddress), sourceXalAddress, this.isSetXalAddress())); copy.setXalAddress(copyXalAddress); } else { if (xalAddressShouldBeCopiedAndSet == Boolean.FALSE) { copy.xalAddress = null; } } } { Boolean multiPointShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetMultiPoint()); if (multiPointShouldBeCopiedAndSet == Boolean.TRUE) { MultiPointPropertyType sourceMultiPoint; sourceMultiPoint = this.getMultiPoint(); MultiPointPropertyType copyMultiPoint = ((MultiPointPropertyType) strategy.copy(LocatorUtils.property(locator, "multiPoint", sourceMultiPoint), sourceMultiPoint, this.isSetMultiPoint())); copy.setMultiPoint(copyMultiPoint); } else { if (multiPointShouldBeCopiedAndSet == Boolean.FALSE) { copy.multiPoint = null; } } } { Boolean genericApplicationPropertyOfAddressShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetGenericApplicationPropertyOfAddress()); if (genericApplicationPropertyOfAddressShouldBeCopiedAndSet == Boolean.TRUE) { List sourceGenericApplicationPropertyOfAddress; sourceGenericApplicationPropertyOfAddress = (this.isSetGenericApplicationPropertyOfAddress()?this.getGenericApplicationPropertyOfAddress():null); @SuppressWarnings("unchecked") List copyGenericApplicationPropertyOfAddress = ((List ) strategy.copy(LocatorUtils.property(locator, "genericApplicationPropertyOfAddress", sourceGenericApplicationPropertyOfAddress), sourceGenericApplicationPropertyOfAddress, this.isSetGenericApplicationPropertyOfAddress())); copy.unsetGenericApplicationPropertyOfAddress(); if (copyGenericApplicationPropertyOfAddress!= null) { List uniqueGenericApplicationPropertyOfAddressl = copy.getGenericApplicationPropertyOfAddress(); uniqueGenericApplicationPropertyOfAddressl.addAll(copyGenericApplicationPropertyOfAddress); } } else { if (genericApplicationPropertyOfAddressShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetGenericApplicationPropertyOfAddress(); } } } } return draftCopy; } public Object createNewInstance() { return new AddressType(); } 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 AddressType) { final AddressType target = this; final AddressType leftObject = ((AddressType) left); final AddressType rightObject = ((AddressType) right); { Boolean xalAddressShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetXalAddress(), rightObject.isSetXalAddress()); if (xalAddressShouldBeMergedAndSet == Boolean.TRUE) { XalAddressPropertyType lhsXalAddress; lhsXalAddress = leftObject.getXalAddress(); XalAddressPropertyType rhsXalAddress; rhsXalAddress = rightObject.getXalAddress(); XalAddressPropertyType mergedXalAddress = ((XalAddressPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "xalAddress", lhsXalAddress), LocatorUtils.property(rightLocator, "xalAddress", rhsXalAddress), lhsXalAddress, rhsXalAddress, leftObject.isSetXalAddress(), rightObject.isSetXalAddress())); target.setXalAddress(mergedXalAddress); } else { if (xalAddressShouldBeMergedAndSet == Boolean.FALSE) { target.xalAddress = null; } } } { Boolean multiPointShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetMultiPoint(), rightObject.isSetMultiPoint()); if (multiPointShouldBeMergedAndSet == Boolean.TRUE) { MultiPointPropertyType lhsMultiPoint; lhsMultiPoint = leftObject.getMultiPoint(); MultiPointPropertyType rhsMultiPoint; rhsMultiPoint = rightObject.getMultiPoint(); MultiPointPropertyType mergedMultiPoint = ((MultiPointPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "multiPoint", lhsMultiPoint), LocatorUtils.property(rightLocator, "multiPoint", rhsMultiPoint), lhsMultiPoint, rhsMultiPoint, leftObject.isSetMultiPoint(), rightObject.isSetMultiPoint())); target.setMultiPoint(mergedMultiPoint); } else { if (multiPointShouldBeMergedAndSet == Boolean.FALSE) { target.multiPoint = null; } } } { Boolean genericApplicationPropertyOfAddressShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetGenericApplicationPropertyOfAddress(), rightObject.isSetGenericApplicationPropertyOfAddress()); if (genericApplicationPropertyOfAddressShouldBeMergedAndSet == Boolean.TRUE) { List lhsGenericApplicationPropertyOfAddress; lhsGenericApplicationPropertyOfAddress = (leftObject.isSetGenericApplicationPropertyOfAddress()?leftObject.getGenericApplicationPropertyOfAddress():null); List rhsGenericApplicationPropertyOfAddress; rhsGenericApplicationPropertyOfAddress = (rightObject.isSetGenericApplicationPropertyOfAddress()?rightObject.getGenericApplicationPropertyOfAddress():null); List mergedGenericApplicationPropertyOfAddress = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "genericApplicationPropertyOfAddress", lhsGenericApplicationPropertyOfAddress), LocatorUtils.property(rightLocator, "genericApplicationPropertyOfAddress", rhsGenericApplicationPropertyOfAddress), lhsGenericApplicationPropertyOfAddress, rhsGenericApplicationPropertyOfAddress, leftObject.isSetGenericApplicationPropertyOfAddress(), rightObject.isSetGenericApplicationPropertyOfAddress())); target.unsetGenericApplicationPropertyOfAddress(); if (mergedGenericApplicationPropertyOfAddress!= null) { List uniqueGenericApplicationPropertyOfAddressl = target.getGenericApplicationPropertyOfAddress(); uniqueGenericApplicationPropertyOfAddressl.addAll(mergedGenericApplicationPropertyOfAddress); } } else { if (genericApplicationPropertyOfAddressShouldBeMergedAndSet == Boolean.FALSE) { target.unsetGenericApplicationPropertyOfAddress(); } } } } } public void setGenericApplicationPropertyOfAddress(List value) { this.genericApplicationPropertyOfAddress = null; if (value!= null) { List draftl = this.getGenericApplicationPropertyOfAddress(); draftl.addAll(value); } } public AddressType withXalAddress(XalAddressPropertyType value) { setXalAddress(value); return this; } public AddressType withMultiPoint(MultiPointPropertyType value) { setMultiPoint(value); return this; } public AddressType withGenericApplicationPropertyOfAddress(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfAddress().add(value); } } return this; } public AddressType withGenericApplicationPropertyOfAddress(Collection values) { if (values!= null) { getGenericApplicationPropertyOfAddress().addAll(values); } return this; } public AddressType withGenericApplicationPropertyOfAddress(List value) { setGenericApplicationPropertyOfAddress(value); return this; } }