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

net.opengis.citygml.appearance.v_2_0.AppearanceType 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.appearance.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 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;


/**
 *  Named container for all surface data (texture/material). All appearances of the same name ("theme")
 * 				within a CityGML file are considered a group. 
 * 
 * 

Java class for AppearanceType complex type. * *

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

 * <complexType name="AppearanceType">
 *   <complexContent>
 *     <extension base="{http://www.opengis.net/gml}AbstractFeatureType">
 *       <sequence>
 *         <element name="theme" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="surfaceDataMember" type="{http://www.opengis.net/citygml/appearance/2.0}SurfaceDataPropertyType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.opengis.net/citygml/appearance/2.0}_GenericApplicationPropertyOfAppearance" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AppearanceType", propOrder = { "theme", "surfaceDataMember", "genericApplicationPropertyOfAppearance" }) public class AppearanceType extends AbstractFeatureType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { protected String theme; protected List surfaceDataMember; @XmlElement(name = "_GenericApplicationPropertyOfAppearance") protected List genericApplicationPropertyOfAppearance; /** * 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 surfaceDataMember 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 surfaceDataMember property. * *

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

     *    getSurfaceDataMember().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link SurfaceDataPropertyType } * * */ public List getSurfaceDataMember() { if (surfaceDataMember == null) { surfaceDataMember = new ArrayList(); } return this.surfaceDataMember; } public boolean isSetSurfaceDataMember() { return ((this.surfaceDataMember!= null)&&(!this.surfaceDataMember.isEmpty())); } public void unsetSurfaceDataMember() { this.surfaceDataMember = null; } /** * Gets the value of the genericApplicationPropertyOfAppearance 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 genericApplicationPropertyOfAppearance property. * *

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

     *    getGenericApplicationPropertyOfAppearance().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List getGenericApplicationPropertyOfAppearance() { if (genericApplicationPropertyOfAppearance == null) { genericApplicationPropertyOfAppearance = new ArrayList(); } return this.genericApplicationPropertyOfAppearance; } public boolean isSetGenericApplicationPropertyOfAppearance() { return ((this.genericApplicationPropertyOfAppearance!= null)&&(!this.genericApplicationPropertyOfAppearance.isEmpty())); } public void unsetGenericApplicationPropertyOfAppearance() { this.genericApplicationPropertyOfAppearance = 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); { String theTheme; theTheme = this.getTheme(); strategy.appendField(locator, this, "theme", buffer, theTheme, this.isSetTheme()); } { List theSurfaceDataMember; theSurfaceDataMember = (this.isSetSurfaceDataMember()?this.getSurfaceDataMember():null); strategy.appendField(locator, this, "surfaceDataMember", buffer, theSurfaceDataMember, this.isSetSurfaceDataMember()); } { List theGenericApplicationPropertyOfAppearance; theGenericApplicationPropertyOfAppearance = (this.isSetGenericApplicationPropertyOfAppearance()?this.getGenericApplicationPropertyOfAppearance():null); strategy.appendField(locator, this, "genericApplicationPropertyOfAppearance", buffer, theGenericApplicationPropertyOfAppearance, this.isSetGenericApplicationPropertyOfAppearance()); } 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 AppearanceType that = ((AppearanceType) object); { 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; } } { List lhsSurfaceDataMember; lhsSurfaceDataMember = (this.isSetSurfaceDataMember()?this.getSurfaceDataMember():null); List rhsSurfaceDataMember; rhsSurfaceDataMember = (that.isSetSurfaceDataMember()?that.getSurfaceDataMember():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "surfaceDataMember", lhsSurfaceDataMember), LocatorUtils.property(thatLocator, "surfaceDataMember", rhsSurfaceDataMember), lhsSurfaceDataMember, rhsSurfaceDataMember, this.isSetSurfaceDataMember(), that.isSetSurfaceDataMember())) { return false; } } { List lhsGenericApplicationPropertyOfAppearance; lhsGenericApplicationPropertyOfAppearance = (this.isSetGenericApplicationPropertyOfAppearance()?this.getGenericApplicationPropertyOfAppearance():null); List rhsGenericApplicationPropertyOfAppearance; rhsGenericApplicationPropertyOfAppearance = (that.isSetGenericApplicationPropertyOfAppearance()?that.getGenericApplicationPropertyOfAppearance():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "genericApplicationPropertyOfAppearance", lhsGenericApplicationPropertyOfAppearance), LocatorUtils.property(thatLocator, "genericApplicationPropertyOfAppearance", rhsGenericApplicationPropertyOfAppearance), lhsGenericApplicationPropertyOfAppearance, rhsGenericApplicationPropertyOfAppearance, this.isSetGenericApplicationPropertyOfAppearance(), that.isSetGenericApplicationPropertyOfAppearance())) { 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); { String theTheme; theTheme = this.getTheme(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "theme", theTheme), currentHashCode, theTheme, this.isSetTheme()); } { List theSurfaceDataMember; theSurfaceDataMember = (this.isSetSurfaceDataMember()?this.getSurfaceDataMember():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "surfaceDataMember", theSurfaceDataMember), currentHashCode, theSurfaceDataMember, this.isSetSurfaceDataMember()); } { List theGenericApplicationPropertyOfAppearance; theGenericApplicationPropertyOfAppearance = (this.isSetGenericApplicationPropertyOfAppearance()?this.getGenericApplicationPropertyOfAppearance():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "genericApplicationPropertyOfAppearance", theGenericApplicationPropertyOfAppearance), currentHashCode, theGenericApplicationPropertyOfAppearance, this.isSetGenericApplicationPropertyOfAppearance()); } 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 AppearanceType) { final AppearanceType copy = ((AppearanceType) draftCopy); { 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 surfaceDataMemberShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSurfaceDataMember()); if (surfaceDataMemberShouldBeCopiedAndSet == Boolean.TRUE) { List sourceSurfaceDataMember; sourceSurfaceDataMember = (this.isSetSurfaceDataMember()?this.getSurfaceDataMember():null); @SuppressWarnings("unchecked") List copySurfaceDataMember = ((List ) strategy.copy(LocatorUtils.property(locator, "surfaceDataMember", sourceSurfaceDataMember), sourceSurfaceDataMember, this.isSetSurfaceDataMember())); copy.unsetSurfaceDataMember(); if (copySurfaceDataMember!= null) { List uniqueSurfaceDataMemberl = copy.getSurfaceDataMember(); uniqueSurfaceDataMemberl.addAll(copySurfaceDataMember); } } else { if (surfaceDataMemberShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetSurfaceDataMember(); } } } { Boolean genericApplicationPropertyOfAppearanceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetGenericApplicationPropertyOfAppearance()); if (genericApplicationPropertyOfAppearanceShouldBeCopiedAndSet == Boolean.TRUE) { List sourceGenericApplicationPropertyOfAppearance; sourceGenericApplicationPropertyOfAppearance = (this.isSetGenericApplicationPropertyOfAppearance()?this.getGenericApplicationPropertyOfAppearance():null); @SuppressWarnings("unchecked") List copyGenericApplicationPropertyOfAppearance = ((List ) strategy.copy(LocatorUtils.property(locator, "genericApplicationPropertyOfAppearance", sourceGenericApplicationPropertyOfAppearance), sourceGenericApplicationPropertyOfAppearance, this.isSetGenericApplicationPropertyOfAppearance())); copy.unsetGenericApplicationPropertyOfAppearance(); if (copyGenericApplicationPropertyOfAppearance!= null) { List uniqueGenericApplicationPropertyOfAppearancel = copy.getGenericApplicationPropertyOfAppearance(); uniqueGenericApplicationPropertyOfAppearancel.addAll(copyGenericApplicationPropertyOfAppearance); } } else { if (genericApplicationPropertyOfAppearanceShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetGenericApplicationPropertyOfAppearance(); } } } } return draftCopy; } public Object createNewInstance() { return new AppearanceType(); } 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 AppearanceType) { final AppearanceType target = this; final AppearanceType leftObject = ((AppearanceType) left); final AppearanceType rightObject = ((AppearanceType) right); { 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 surfaceDataMemberShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSurfaceDataMember(), rightObject.isSetSurfaceDataMember()); if (surfaceDataMemberShouldBeMergedAndSet == Boolean.TRUE) { List lhsSurfaceDataMember; lhsSurfaceDataMember = (leftObject.isSetSurfaceDataMember()?leftObject.getSurfaceDataMember():null); List rhsSurfaceDataMember; rhsSurfaceDataMember = (rightObject.isSetSurfaceDataMember()?rightObject.getSurfaceDataMember():null); List mergedSurfaceDataMember = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "surfaceDataMember", lhsSurfaceDataMember), LocatorUtils.property(rightLocator, "surfaceDataMember", rhsSurfaceDataMember), lhsSurfaceDataMember, rhsSurfaceDataMember, leftObject.isSetSurfaceDataMember(), rightObject.isSetSurfaceDataMember())); target.unsetSurfaceDataMember(); if (mergedSurfaceDataMember!= null) { List uniqueSurfaceDataMemberl = target.getSurfaceDataMember(); uniqueSurfaceDataMemberl.addAll(mergedSurfaceDataMember); } } else { if (surfaceDataMemberShouldBeMergedAndSet == Boolean.FALSE) { target.unsetSurfaceDataMember(); } } } { Boolean genericApplicationPropertyOfAppearanceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetGenericApplicationPropertyOfAppearance(), rightObject.isSetGenericApplicationPropertyOfAppearance()); if (genericApplicationPropertyOfAppearanceShouldBeMergedAndSet == Boolean.TRUE) { List lhsGenericApplicationPropertyOfAppearance; lhsGenericApplicationPropertyOfAppearance = (leftObject.isSetGenericApplicationPropertyOfAppearance()?leftObject.getGenericApplicationPropertyOfAppearance():null); List rhsGenericApplicationPropertyOfAppearance; rhsGenericApplicationPropertyOfAppearance = (rightObject.isSetGenericApplicationPropertyOfAppearance()?rightObject.getGenericApplicationPropertyOfAppearance():null); List mergedGenericApplicationPropertyOfAppearance = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "genericApplicationPropertyOfAppearance", lhsGenericApplicationPropertyOfAppearance), LocatorUtils.property(rightLocator, "genericApplicationPropertyOfAppearance", rhsGenericApplicationPropertyOfAppearance), lhsGenericApplicationPropertyOfAppearance, rhsGenericApplicationPropertyOfAppearance, leftObject.isSetGenericApplicationPropertyOfAppearance(), rightObject.isSetGenericApplicationPropertyOfAppearance())); target.unsetGenericApplicationPropertyOfAppearance(); if (mergedGenericApplicationPropertyOfAppearance!= null) { List uniqueGenericApplicationPropertyOfAppearancel = target.getGenericApplicationPropertyOfAppearance(); uniqueGenericApplicationPropertyOfAppearancel.addAll(mergedGenericApplicationPropertyOfAppearance); } } else { if (genericApplicationPropertyOfAppearanceShouldBeMergedAndSet == Boolean.FALSE) { target.unsetGenericApplicationPropertyOfAppearance(); } } } } } public void setSurfaceDataMember(List value) { this.surfaceDataMember = null; if (value!= null) { List draftl = this.getSurfaceDataMember(); draftl.addAll(value); } } public void setGenericApplicationPropertyOfAppearance(List value) { this.genericApplicationPropertyOfAppearance = null; if (value!= null) { List draftl = this.getGenericApplicationPropertyOfAppearance(); draftl.addAll(value); } } public AppearanceType withTheme(String value) { setTheme(value); return this; } public AppearanceType withSurfaceDataMember(SurfaceDataPropertyType... values) { if (values!= null) { for (SurfaceDataPropertyType value: values) { getSurfaceDataMember().add(value); } } return this; } public AppearanceType withSurfaceDataMember(Collection values) { if (values!= null) { getSurfaceDataMember().addAll(values); } return this; } public AppearanceType withGenericApplicationPropertyOfAppearance(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfAppearance().add(value); } } return this; } public AppearanceType withGenericApplicationPropertyOfAppearance(Collection values) { if (values!= null) { getGenericApplicationPropertyOfAppearance().addAll(values); } return this; } public AppearanceType withSurfaceDataMember(List value) { setSurfaceDataMember(value); return this; } public AppearanceType withGenericApplicationPropertyOfAppearance(List value) { setGenericApplicationPropertyOfAppearance(value); return this; } }