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

net.opengis.citygml.waterbody.v_2_0.WaterSurfaceType 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.waterbody.v_2_0;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.JAXBElement;
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 javax.xml.datatype.XMLGregorianCalendar;
import net.opengis.citygml.v_2_0.ExternalReferenceType;
import net.opengis.citygml.v_2_0.GeneralizationRelationType;
import net.opengis.citygml.v_2_0.RelativeToTerrainType;
import net.opengis.citygml.v_2_0.RelativeToWaterType;
import net.opengis.gml.v_3_1_1.CodeType;
import net.opengis.gml.v_3_1_1.SurfacePropertyType;
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 describing the surface of a water body, which separates the water from the air. As subclass of
 * 				_CityObject, a WaterSurface inherits all attributes and relations, in particular an id, names, external references, and
 * 				generalization relations. 
 * 
 * 

Java class for WaterSurfaceType complex type. * *

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

 * <complexType name="WaterSurfaceType">
 *   <complexContent>
 *     <extension base="{http://www.opengis.net/citygml/waterbody/2.0}AbstractWaterBoundarySurfaceType">
 *       <sequence>
 *         <element name="waterLevel" type="{http://www.opengis.net/gml}CodeType" minOccurs="0"/>
 *         <element ref="{http://www.opengis.net/citygml/waterbody/2.0}_GenericApplicationPropertyOfWaterSurface" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "WaterSurfaceType", propOrder = { "waterLevel", "genericApplicationPropertyOfWaterSurface" }) public class WaterSurfaceType extends AbstractWaterBoundarySurfaceType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { protected CodeType waterLevel; @XmlElement(name = "_GenericApplicationPropertyOfWaterSurface") protected List genericApplicationPropertyOfWaterSurface; /** * Gets the value of the waterLevel property. * * @return * possible object is * {@link CodeType } * */ public CodeType getWaterLevel() { return waterLevel; } /** * Sets the value of the waterLevel property. * * @param value * allowed object is * {@link CodeType } * */ public void setWaterLevel(CodeType value) { this.waterLevel = value; } public boolean isSetWaterLevel() { return (this.waterLevel!= null); } /** * Gets the value of the genericApplicationPropertyOfWaterSurface 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 genericApplicationPropertyOfWaterSurface property. * *

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

     *    getGenericApplicationPropertyOfWaterSurface().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List getGenericApplicationPropertyOfWaterSurface() { if (genericApplicationPropertyOfWaterSurface == null) { genericApplicationPropertyOfWaterSurface = new ArrayList(); } return this.genericApplicationPropertyOfWaterSurface; } public boolean isSetGenericApplicationPropertyOfWaterSurface() { return ((this.genericApplicationPropertyOfWaterSurface!= null)&&(!this.genericApplicationPropertyOfWaterSurface.isEmpty())); } public void unsetGenericApplicationPropertyOfWaterSurface() { this.genericApplicationPropertyOfWaterSurface = 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); { CodeType theWaterLevel; theWaterLevel = this.getWaterLevel(); strategy.appendField(locator, this, "waterLevel", buffer, theWaterLevel, this.isSetWaterLevel()); } { List theGenericApplicationPropertyOfWaterSurface; theGenericApplicationPropertyOfWaterSurface = (this.isSetGenericApplicationPropertyOfWaterSurface()?this.getGenericApplicationPropertyOfWaterSurface():null); strategy.appendField(locator, this, "genericApplicationPropertyOfWaterSurface", buffer, theGenericApplicationPropertyOfWaterSurface, this.isSetGenericApplicationPropertyOfWaterSurface()); } 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 WaterSurfaceType that = ((WaterSurfaceType) object); { CodeType lhsWaterLevel; lhsWaterLevel = this.getWaterLevel(); CodeType rhsWaterLevel; rhsWaterLevel = that.getWaterLevel(); if (!strategy.equals(LocatorUtils.property(thisLocator, "waterLevel", lhsWaterLevel), LocatorUtils.property(thatLocator, "waterLevel", rhsWaterLevel), lhsWaterLevel, rhsWaterLevel, this.isSetWaterLevel(), that.isSetWaterLevel())) { return false; } } { List lhsGenericApplicationPropertyOfWaterSurface; lhsGenericApplicationPropertyOfWaterSurface = (this.isSetGenericApplicationPropertyOfWaterSurface()?this.getGenericApplicationPropertyOfWaterSurface():null); List rhsGenericApplicationPropertyOfWaterSurface; rhsGenericApplicationPropertyOfWaterSurface = (that.isSetGenericApplicationPropertyOfWaterSurface()?that.getGenericApplicationPropertyOfWaterSurface():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "genericApplicationPropertyOfWaterSurface", lhsGenericApplicationPropertyOfWaterSurface), LocatorUtils.property(thatLocator, "genericApplicationPropertyOfWaterSurface", rhsGenericApplicationPropertyOfWaterSurface), lhsGenericApplicationPropertyOfWaterSurface, rhsGenericApplicationPropertyOfWaterSurface, this.isSetGenericApplicationPropertyOfWaterSurface(), that.isSetGenericApplicationPropertyOfWaterSurface())) { 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); { CodeType theWaterLevel; theWaterLevel = this.getWaterLevel(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "waterLevel", theWaterLevel), currentHashCode, theWaterLevel, this.isSetWaterLevel()); } { List theGenericApplicationPropertyOfWaterSurface; theGenericApplicationPropertyOfWaterSurface = (this.isSetGenericApplicationPropertyOfWaterSurface()?this.getGenericApplicationPropertyOfWaterSurface():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "genericApplicationPropertyOfWaterSurface", theGenericApplicationPropertyOfWaterSurface), currentHashCode, theGenericApplicationPropertyOfWaterSurface, this.isSetGenericApplicationPropertyOfWaterSurface()); } 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 WaterSurfaceType) { final WaterSurfaceType copy = ((WaterSurfaceType) draftCopy); { Boolean waterLevelShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetWaterLevel()); if (waterLevelShouldBeCopiedAndSet == Boolean.TRUE) { CodeType sourceWaterLevel; sourceWaterLevel = this.getWaterLevel(); CodeType copyWaterLevel = ((CodeType) strategy.copy(LocatorUtils.property(locator, "waterLevel", sourceWaterLevel), sourceWaterLevel, this.isSetWaterLevel())); copy.setWaterLevel(copyWaterLevel); } else { if (waterLevelShouldBeCopiedAndSet == Boolean.FALSE) { copy.waterLevel = null; } } } { Boolean genericApplicationPropertyOfWaterSurfaceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetGenericApplicationPropertyOfWaterSurface()); if (genericApplicationPropertyOfWaterSurfaceShouldBeCopiedAndSet == Boolean.TRUE) { List sourceGenericApplicationPropertyOfWaterSurface; sourceGenericApplicationPropertyOfWaterSurface = (this.isSetGenericApplicationPropertyOfWaterSurface()?this.getGenericApplicationPropertyOfWaterSurface():null); @SuppressWarnings("unchecked") List copyGenericApplicationPropertyOfWaterSurface = ((List ) strategy.copy(LocatorUtils.property(locator, "genericApplicationPropertyOfWaterSurface", sourceGenericApplicationPropertyOfWaterSurface), sourceGenericApplicationPropertyOfWaterSurface, this.isSetGenericApplicationPropertyOfWaterSurface())); copy.unsetGenericApplicationPropertyOfWaterSurface(); if (copyGenericApplicationPropertyOfWaterSurface!= null) { List uniqueGenericApplicationPropertyOfWaterSurfacel = copy.getGenericApplicationPropertyOfWaterSurface(); uniqueGenericApplicationPropertyOfWaterSurfacel.addAll(copyGenericApplicationPropertyOfWaterSurface); } } else { if (genericApplicationPropertyOfWaterSurfaceShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetGenericApplicationPropertyOfWaterSurface(); } } } } return draftCopy; } public Object createNewInstance() { return new WaterSurfaceType(); } 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 WaterSurfaceType) { final WaterSurfaceType target = this; final WaterSurfaceType leftObject = ((WaterSurfaceType) left); final WaterSurfaceType rightObject = ((WaterSurfaceType) right); { Boolean waterLevelShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetWaterLevel(), rightObject.isSetWaterLevel()); if (waterLevelShouldBeMergedAndSet == Boolean.TRUE) { CodeType lhsWaterLevel; lhsWaterLevel = leftObject.getWaterLevel(); CodeType rhsWaterLevel; rhsWaterLevel = rightObject.getWaterLevel(); CodeType mergedWaterLevel = ((CodeType) strategy.merge(LocatorUtils.property(leftLocator, "waterLevel", lhsWaterLevel), LocatorUtils.property(rightLocator, "waterLevel", rhsWaterLevel), lhsWaterLevel, rhsWaterLevel, leftObject.isSetWaterLevel(), rightObject.isSetWaterLevel())); target.setWaterLevel(mergedWaterLevel); } else { if (waterLevelShouldBeMergedAndSet == Boolean.FALSE) { target.waterLevel = null; } } } { Boolean genericApplicationPropertyOfWaterSurfaceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetGenericApplicationPropertyOfWaterSurface(), rightObject.isSetGenericApplicationPropertyOfWaterSurface()); if (genericApplicationPropertyOfWaterSurfaceShouldBeMergedAndSet == Boolean.TRUE) { List lhsGenericApplicationPropertyOfWaterSurface; lhsGenericApplicationPropertyOfWaterSurface = (leftObject.isSetGenericApplicationPropertyOfWaterSurface()?leftObject.getGenericApplicationPropertyOfWaterSurface():null); List rhsGenericApplicationPropertyOfWaterSurface; rhsGenericApplicationPropertyOfWaterSurface = (rightObject.isSetGenericApplicationPropertyOfWaterSurface()?rightObject.getGenericApplicationPropertyOfWaterSurface():null); List mergedGenericApplicationPropertyOfWaterSurface = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "genericApplicationPropertyOfWaterSurface", lhsGenericApplicationPropertyOfWaterSurface), LocatorUtils.property(rightLocator, "genericApplicationPropertyOfWaterSurface", rhsGenericApplicationPropertyOfWaterSurface), lhsGenericApplicationPropertyOfWaterSurface, rhsGenericApplicationPropertyOfWaterSurface, leftObject.isSetGenericApplicationPropertyOfWaterSurface(), rightObject.isSetGenericApplicationPropertyOfWaterSurface())); target.unsetGenericApplicationPropertyOfWaterSurface(); if (mergedGenericApplicationPropertyOfWaterSurface!= null) { List uniqueGenericApplicationPropertyOfWaterSurfacel = target.getGenericApplicationPropertyOfWaterSurface(); uniqueGenericApplicationPropertyOfWaterSurfacel.addAll(mergedGenericApplicationPropertyOfWaterSurface); } } else { if (genericApplicationPropertyOfWaterSurfaceShouldBeMergedAndSet == Boolean.FALSE) { target.unsetGenericApplicationPropertyOfWaterSurface(); } } } } } public void setGenericApplicationPropertyOfWaterSurface(List value) { this.genericApplicationPropertyOfWaterSurface = null; if (value!= null) { List draftl = this.getGenericApplicationPropertyOfWaterSurface(); draftl.addAll(value); } } public WaterSurfaceType withWaterLevel(CodeType value) { setWaterLevel(value); return this; } public WaterSurfaceType withGenericApplicationPropertyOfWaterSurface(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfWaterSurface().add(value); } } return this; } public WaterSurfaceType withGenericApplicationPropertyOfWaterSurface(Collection values) { if (values!= null) { getGenericApplicationPropertyOfWaterSurface().addAll(values); } return this; } public WaterSurfaceType withGenericApplicationPropertyOfWaterSurface(List value) { setGenericApplicationPropertyOfWaterSurface(value); return this; } @Override public WaterSurfaceType withLod2Surface(SurfacePropertyType value) { setLod2Surface(value); return this; } @Override public WaterSurfaceType withLod3Surface(SurfacePropertyType value) { setLod3Surface(value); return this; } @Override public WaterSurfaceType withLod4Surface(SurfacePropertyType value) { setLod4Surface(value); return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfWaterBoundarySurface(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfWaterBoundarySurface().add(value); } } return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfWaterBoundarySurface(Collection values) { if (values!= null) { getGenericApplicationPropertyOfWaterBoundarySurface().addAll(values); } return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfWaterBoundarySurface(List value) { setGenericApplicationPropertyOfWaterBoundarySurface(value); return this; } @Override public WaterSurfaceType withCreationDate(XMLGregorianCalendar value) { setCreationDate(value); return this; } @Override public WaterSurfaceType withTerminationDate(XMLGregorianCalendar value) { setTerminationDate(value); return this; } @Override public WaterSurfaceType withExternalReference(ExternalReferenceType... values) { if (values!= null) { for (ExternalReferenceType value: values) { getExternalReference().add(value); } } return this; } @Override public WaterSurfaceType withExternalReference(Collection values) { if (values!= null) { getExternalReference().addAll(values); } return this; } @Override public WaterSurfaceType withGeneralizesTo(GeneralizationRelationType... values) { if (values!= null) { for (GeneralizationRelationType value: values) { getGeneralizesTo().add(value); } } return this; } @Override public WaterSurfaceType withGeneralizesTo(Collection values) { if (values!= null) { getGeneralizesTo().addAll(values); } return this; } @Override public WaterSurfaceType withRelativeToTerrain(RelativeToTerrainType value) { setRelativeToTerrain(value); return this; } @Override public WaterSurfaceType withRelativeToWater(RelativeToWaterType value) { setRelativeToWater(value); return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfCityObject(JAXBElement ... values) { if (values!= null) { for (JAXBElement value: values) { getGenericApplicationPropertyOfCityObject().add(value); } } return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfCityObject(Collection> values) { if (values!= null) { getGenericApplicationPropertyOfCityObject().addAll(values); } return this; } @Override public WaterSurfaceType withExternalReference(List value) { setExternalReference(value); return this; } @Override public WaterSurfaceType withGeneralizesTo(List value) { setGeneralizesTo(value); return this; } @Override public WaterSurfaceType withGenericApplicationPropertyOfCityObject(List> value) { setGenericApplicationPropertyOfCityObject(value); return this; } }