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

net.opengis.citygml.appearance.v_2_0.X3DMaterialType 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.XmlList;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
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;


/**
 * Class for defining constant surface properties. It is based on X3D's material definition. In addition,
 * 				"isSmooth" provides a hint for value interpolation. The link to surface geometry is established via the "target"-property.
 * 				Only gml:MultiSurface or decendants of gml:AbstractSurfaceType are valid targets. 
 * 
 * 

Java class for X3DMaterialType complex type. * *

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

 * <complexType name="X3DMaterialType">
 *   <complexContent>
 *     <extension base="{http://www.opengis.net/citygml/appearance/2.0}AbstractSurfaceDataType">
 *       <sequence>
 *         <element name="ambientIntensity" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
 *         <element name="diffuseColor" type="{http://www.opengis.net/citygml/appearance/2.0}Color" minOccurs="0"/>
 *         <element name="emissiveColor" type="{http://www.opengis.net/citygml/appearance/2.0}Color" minOccurs="0"/>
 *         <element name="specularColor" type="{http://www.opengis.net/citygml/appearance/2.0}Color" minOccurs="0"/>
 *         <element name="shininess" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
 *         <element name="transparency" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
 *         <element name="isSmooth" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *         <element name="target" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.opengis.net/citygml/appearance/2.0}_GenericApplicationPropertyOfX3DMaterial" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "X3DMaterialType", propOrder = { "ambientIntensity", "diffuseColor", "emissiveColor", "specularColor", "shininess", "transparency", "isSmooth", "target", "genericApplicationPropertyOfX3DMaterial" }) public class X3DMaterialType extends AbstractSurfaceDataType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { @XmlElement(defaultValue = "0.2") protected Double ambientIntensity; @XmlList @XmlElement(type = Double.class, defaultValue = "0.8 0.8 0.8") @XmlSchemaType(name = "anySimpleType") protected List diffuseColor; @XmlList @XmlElement(type = Double.class, defaultValue = "0.0 0.0 0.0") @XmlSchemaType(name = "anySimpleType") protected List emissiveColor; @XmlList @XmlElement(type = Double.class, defaultValue = "1.0 1.0 1.0") @XmlSchemaType(name = "anySimpleType") protected List specularColor; @XmlElement(defaultValue = "0.2") protected Double shininess; @XmlElement(defaultValue = "0.0") protected Double transparency; @XmlElement(defaultValue = "false") protected Boolean isSmooth; @XmlSchemaType(name = "anyURI") protected List target; @XmlElement(name = "_GenericApplicationPropertyOfX3DMaterial") protected List genericApplicationPropertyOfX3DMaterial; /** * Gets the value of the ambientIntensity property. * * @return * possible object is * {@link Double } * */ public Double getAmbientIntensity() { return ambientIntensity; } /** * Sets the value of the ambientIntensity property. * * @param value * allowed object is * {@link Double } * */ public void setAmbientIntensity(Double value) { this.ambientIntensity = value; } public boolean isSetAmbientIntensity() { return (this.ambientIntensity!= null); } /** * Gets the value of the diffuseColor 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 diffuseColor property. * *

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

     *    getDiffuseColor().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Double } * * */ public List getDiffuseColor() { if (diffuseColor == null) { diffuseColor = new ArrayList(); } return this.diffuseColor; } public boolean isSetDiffuseColor() { return ((this.diffuseColor!= null)&&(!this.diffuseColor.isEmpty())); } public void unsetDiffuseColor() { this.diffuseColor = null; } /** * Gets the value of the emissiveColor 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 emissiveColor property. * *

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

     *    getEmissiveColor().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Double } * * */ public List getEmissiveColor() { if (emissiveColor == null) { emissiveColor = new ArrayList(); } return this.emissiveColor; } public boolean isSetEmissiveColor() { return ((this.emissiveColor!= null)&&(!this.emissiveColor.isEmpty())); } public void unsetEmissiveColor() { this.emissiveColor = null; } /** * Gets the value of the specularColor 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 specularColor property. * *

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

     *    getSpecularColor().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Double } * * */ public List getSpecularColor() { if (specularColor == null) { specularColor = new ArrayList(); } return this.specularColor; } public boolean isSetSpecularColor() { return ((this.specularColor!= null)&&(!this.specularColor.isEmpty())); } public void unsetSpecularColor() { this.specularColor = null; } /** * Gets the value of the shininess property. * * @return * possible object is * {@link Double } * */ public Double getShininess() { return shininess; } /** * Sets the value of the shininess property. * * @param value * allowed object is * {@link Double } * */ public void setShininess(Double value) { this.shininess = value; } public boolean isSetShininess() { return (this.shininess!= null); } /** * Gets the value of the transparency property. * * @return * possible object is * {@link Double } * */ public Double getTransparency() { return transparency; } /** * Sets the value of the transparency property. * * @param value * allowed object is * {@link Double } * */ public void setTransparency(Double value) { this.transparency = value; } public boolean isSetTransparency() { return (this.transparency!= null); } /** * Gets the value of the isSmooth property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsSmooth() { return isSmooth; } /** * Sets the value of the isSmooth property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsSmooth(Boolean value) { this.isSmooth = value; } public boolean isSetIsSmooth() { return (this.isSmooth!= null); } /** * Gets the value of the target 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 target property. * *

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

     *    getTarget().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } * * */ public List getTarget() { if (target == null) { target = new ArrayList(); } return this.target; } public boolean isSetTarget() { return ((this.target!= null)&&(!this.target.isEmpty())); } public void unsetTarget() { this.target = null; } /** * Gets the value of the genericApplicationPropertyOfX3DMaterial 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 genericApplicationPropertyOfX3DMaterial property. * *

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

     *    getGenericApplicationPropertyOfX3DMaterial().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List getGenericApplicationPropertyOfX3DMaterial() { if (genericApplicationPropertyOfX3DMaterial == null) { genericApplicationPropertyOfX3DMaterial = new ArrayList(); } return this.genericApplicationPropertyOfX3DMaterial; } public boolean isSetGenericApplicationPropertyOfX3DMaterial() { return ((this.genericApplicationPropertyOfX3DMaterial!= null)&&(!this.genericApplicationPropertyOfX3DMaterial.isEmpty())); } public void unsetGenericApplicationPropertyOfX3DMaterial() { this.genericApplicationPropertyOfX3DMaterial = 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); { Double theAmbientIntensity; theAmbientIntensity = this.getAmbientIntensity(); strategy.appendField(locator, this, "ambientIntensity", buffer, theAmbientIntensity, this.isSetAmbientIntensity()); } { List theDiffuseColor; theDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null); strategy.appendField(locator, this, "diffuseColor", buffer, theDiffuseColor, this.isSetDiffuseColor()); } { List theEmissiveColor; theEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null); strategy.appendField(locator, this, "emissiveColor", buffer, theEmissiveColor, this.isSetEmissiveColor()); } { List theSpecularColor; theSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null); strategy.appendField(locator, this, "specularColor", buffer, theSpecularColor, this.isSetSpecularColor()); } { Double theShininess; theShininess = this.getShininess(); strategy.appendField(locator, this, "shininess", buffer, theShininess, this.isSetShininess()); } { Double theTransparency; theTransparency = this.getTransparency(); strategy.appendField(locator, this, "transparency", buffer, theTransparency, this.isSetTransparency()); } { Boolean theIsSmooth; theIsSmooth = this.isIsSmooth(); strategy.appendField(locator, this, "isSmooth", buffer, theIsSmooth, this.isSetIsSmooth()); } { List theTarget; theTarget = (this.isSetTarget()?this.getTarget():null); strategy.appendField(locator, this, "target", buffer, theTarget, this.isSetTarget()); } { List theGenericApplicationPropertyOfX3DMaterial; theGenericApplicationPropertyOfX3DMaterial = (this.isSetGenericApplicationPropertyOfX3DMaterial()?this.getGenericApplicationPropertyOfX3DMaterial():null); strategy.appendField(locator, this, "genericApplicationPropertyOfX3DMaterial", buffer, theGenericApplicationPropertyOfX3DMaterial, this.isSetGenericApplicationPropertyOfX3DMaterial()); } 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 X3DMaterialType that = ((X3DMaterialType) object); { Double lhsAmbientIntensity; lhsAmbientIntensity = this.getAmbientIntensity(); Double rhsAmbientIntensity; rhsAmbientIntensity = that.getAmbientIntensity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "ambientIntensity", lhsAmbientIntensity), LocatorUtils.property(thatLocator, "ambientIntensity", rhsAmbientIntensity), lhsAmbientIntensity, rhsAmbientIntensity, this.isSetAmbientIntensity(), that.isSetAmbientIntensity())) { return false; } } { List lhsDiffuseColor; lhsDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null); List rhsDiffuseColor; rhsDiffuseColor = (that.isSetDiffuseColor()?that.getDiffuseColor():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "diffuseColor", lhsDiffuseColor), LocatorUtils.property(thatLocator, "diffuseColor", rhsDiffuseColor), lhsDiffuseColor, rhsDiffuseColor, this.isSetDiffuseColor(), that.isSetDiffuseColor())) { return false; } } { List lhsEmissiveColor; lhsEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null); List rhsEmissiveColor; rhsEmissiveColor = (that.isSetEmissiveColor()?that.getEmissiveColor():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "emissiveColor", lhsEmissiveColor), LocatorUtils.property(thatLocator, "emissiveColor", rhsEmissiveColor), lhsEmissiveColor, rhsEmissiveColor, this.isSetEmissiveColor(), that.isSetEmissiveColor())) { return false; } } { List lhsSpecularColor; lhsSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null); List rhsSpecularColor; rhsSpecularColor = (that.isSetSpecularColor()?that.getSpecularColor():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "specularColor", lhsSpecularColor), LocatorUtils.property(thatLocator, "specularColor", rhsSpecularColor), lhsSpecularColor, rhsSpecularColor, this.isSetSpecularColor(), that.isSetSpecularColor())) { return false; } } { Double lhsShininess; lhsShininess = this.getShininess(); Double rhsShininess; rhsShininess = that.getShininess(); if (!strategy.equals(LocatorUtils.property(thisLocator, "shininess", lhsShininess), LocatorUtils.property(thatLocator, "shininess", rhsShininess), lhsShininess, rhsShininess, this.isSetShininess(), that.isSetShininess())) { return false; } } { Double lhsTransparency; lhsTransparency = this.getTransparency(); Double rhsTransparency; rhsTransparency = that.getTransparency(); if (!strategy.equals(LocatorUtils.property(thisLocator, "transparency", lhsTransparency), LocatorUtils.property(thatLocator, "transparency", rhsTransparency), lhsTransparency, rhsTransparency, this.isSetTransparency(), that.isSetTransparency())) { return false; } } { Boolean lhsIsSmooth; lhsIsSmooth = this.isIsSmooth(); Boolean rhsIsSmooth; rhsIsSmooth = that.isIsSmooth(); if (!strategy.equals(LocatorUtils.property(thisLocator, "isSmooth", lhsIsSmooth), LocatorUtils.property(thatLocator, "isSmooth", rhsIsSmooth), lhsIsSmooth, rhsIsSmooth, this.isSetIsSmooth(), that.isSetIsSmooth())) { return false; } } { List lhsTarget; lhsTarget = (this.isSetTarget()?this.getTarget():null); List rhsTarget; rhsTarget = (that.isSetTarget()?that.getTarget():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget, this.isSetTarget(), that.isSetTarget())) { return false; } } { List lhsGenericApplicationPropertyOfX3DMaterial; lhsGenericApplicationPropertyOfX3DMaterial = (this.isSetGenericApplicationPropertyOfX3DMaterial()?this.getGenericApplicationPropertyOfX3DMaterial():null); List rhsGenericApplicationPropertyOfX3DMaterial; rhsGenericApplicationPropertyOfX3DMaterial = (that.isSetGenericApplicationPropertyOfX3DMaterial()?that.getGenericApplicationPropertyOfX3DMaterial():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "genericApplicationPropertyOfX3DMaterial", lhsGenericApplicationPropertyOfX3DMaterial), LocatorUtils.property(thatLocator, "genericApplicationPropertyOfX3DMaterial", rhsGenericApplicationPropertyOfX3DMaterial), lhsGenericApplicationPropertyOfX3DMaterial, rhsGenericApplicationPropertyOfX3DMaterial, this.isSetGenericApplicationPropertyOfX3DMaterial(), that.isSetGenericApplicationPropertyOfX3DMaterial())) { 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); { Double theAmbientIntensity; theAmbientIntensity = this.getAmbientIntensity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ambientIntensity", theAmbientIntensity), currentHashCode, theAmbientIntensity, this.isSetAmbientIntensity()); } { List theDiffuseColor; theDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "diffuseColor", theDiffuseColor), currentHashCode, theDiffuseColor, this.isSetDiffuseColor()); } { List theEmissiveColor; theEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "emissiveColor", theEmissiveColor), currentHashCode, theEmissiveColor, this.isSetEmissiveColor()); } { List theSpecularColor; theSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "specularColor", theSpecularColor), currentHashCode, theSpecularColor, this.isSetSpecularColor()); } { Double theShininess; theShininess = this.getShininess(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "shininess", theShininess), currentHashCode, theShininess, this.isSetShininess()); } { Double theTransparency; theTransparency = this.getTransparency(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "transparency", theTransparency), currentHashCode, theTransparency, this.isSetTransparency()); } { Boolean theIsSmooth; theIsSmooth = this.isIsSmooth(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "isSmooth", theIsSmooth), currentHashCode, theIsSmooth, this.isSetIsSmooth()); } { List theTarget; theTarget = (this.isSetTarget()?this.getTarget():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget, this.isSetTarget()); } { List theGenericApplicationPropertyOfX3DMaterial; theGenericApplicationPropertyOfX3DMaterial = (this.isSetGenericApplicationPropertyOfX3DMaterial()?this.getGenericApplicationPropertyOfX3DMaterial():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "genericApplicationPropertyOfX3DMaterial", theGenericApplicationPropertyOfX3DMaterial), currentHashCode, theGenericApplicationPropertyOfX3DMaterial, this.isSetGenericApplicationPropertyOfX3DMaterial()); } 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 X3DMaterialType) { final X3DMaterialType copy = ((X3DMaterialType) draftCopy); { Boolean ambientIntensityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetAmbientIntensity()); if (ambientIntensityShouldBeCopiedAndSet == Boolean.TRUE) { Double sourceAmbientIntensity; sourceAmbientIntensity = this.getAmbientIntensity(); Double copyAmbientIntensity = ((Double) strategy.copy(LocatorUtils.property(locator, "ambientIntensity", sourceAmbientIntensity), sourceAmbientIntensity, this.isSetAmbientIntensity())); copy.setAmbientIntensity(copyAmbientIntensity); } else { if (ambientIntensityShouldBeCopiedAndSet == Boolean.FALSE) { copy.ambientIntensity = null; } } } { Boolean diffuseColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDiffuseColor()); if (diffuseColorShouldBeCopiedAndSet == Boolean.TRUE) { List sourceDiffuseColor; sourceDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null); @SuppressWarnings("unchecked") List copyDiffuseColor = ((List ) strategy.copy(LocatorUtils.property(locator, "diffuseColor", sourceDiffuseColor), sourceDiffuseColor, this.isSetDiffuseColor())); copy.unsetDiffuseColor(); if (copyDiffuseColor!= null) { List uniqueDiffuseColorl = copy.getDiffuseColor(); uniqueDiffuseColorl.addAll(copyDiffuseColor); } } else { if (diffuseColorShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetDiffuseColor(); } } } { Boolean emissiveColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetEmissiveColor()); if (emissiveColorShouldBeCopiedAndSet == Boolean.TRUE) { List sourceEmissiveColor; sourceEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null); @SuppressWarnings("unchecked") List copyEmissiveColor = ((List ) strategy.copy(LocatorUtils.property(locator, "emissiveColor", sourceEmissiveColor), sourceEmissiveColor, this.isSetEmissiveColor())); copy.unsetEmissiveColor(); if (copyEmissiveColor!= null) { List uniqueEmissiveColorl = copy.getEmissiveColor(); uniqueEmissiveColorl.addAll(copyEmissiveColor); } } else { if (emissiveColorShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetEmissiveColor(); } } } { Boolean specularColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSpecularColor()); if (specularColorShouldBeCopiedAndSet == Boolean.TRUE) { List sourceSpecularColor; sourceSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null); @SuppressWarnings("unchecked") List copySpecularColor = ((List ) strategy.copy(LocatorUtils.property(locator, "specularColor", sourceSpecularColor), sourceSpecularColor, this.isSetSpecularColor())); copy.unsetSpecularColor(); if (copySpecularColor!= null) { List uniqueSpecularColorl = copy.getSpecularColor(); uniqueSpecularColorl.addAll(copySpecularColor); } } else { if (specularColorShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetSpecularColor(); } } } { Boolean shininessShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetShininess()); if (shininessShouldBeCopiedAndSet == Boolean.TRUE) { Double sourceShininess; sourceShininess = this.getShininess(); Double copyShininess = ((Double) strategy.copy(LocatorUtils.property(locator, "shininess", sourceShininess), sourceShininess, this.isSetShininess())); copy.setShininess(copyShininess); } else { if (shininessShouldBeCopiedAndSet == Boolean.FALSE) { copy.shininess = null; } } } { Boolean transparencyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTransparency()); if (transparencyShouldBeCopiedAndSet == Boolean.TRUE) { Double sourceTransparency; sourceTransparency = this.getTransparency(); Double copyTransparency = ((Double) strategy.copy(LocatorUtils.property(locator, "transparency", sourceTransparency), sourceTransparency, this.isSetTransparency())); copy.setTransparency(copyTransparency); } else { if (transparencyShouldBeCopiedAndSet == Boolean.FALSE) { copy.transparency = null; } } } { Boolean isSmoothShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetIsSmooth()); if (isSmoothShouldBeCopiedAndSet == Boolean.TRUE) { Boolean sourceIsSmooth; sourceIsSmooth = this.isIsSmooth(); Boolean copyIsSmooth = ((Boolean) strategy.copy(LocatorUtils.property(locator, "isSmooth", sourceIsSmooth), sourceIsSmooth, this.isSetIsSmooth())); copy.setIsSmooth(copyIsSmooth); } else { if (isSmoothShouldBeCopiedAndSet == Boolean.FALSE) { copy.isSmooth = null; } } } { Boolean targetShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTarget()); if (targetShouldBeCopiedAndSet == Boolean.TRUE) { List sourceTarget; sourceTarget = (this.isSetTarget()?this.getTarget():null); @SuppressWarnings("unchecked") List copyTarget = ((List ) strategy.copy(LocatorUtils.property(locator, "target", sourceTarget), sourceTarget, this.isSetTarget())); copy.unsetTarget(); if (copyTarget!= null) { List uniqueTargetl = copy.getTarget(); uniqueTargetl.addAll(copyTarget); } } else { if (targetShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetTarget(); } } } { Boolean genericApplicationPropertyOfX3DMaterialShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetGenericApplicationPropertyOfX3DMaterial()); if (genericApplicationPropertyOfX3DMaterialShouldBeCopiedAndSet == Boolean.TRUE) { List sourceGenericApplicationPropertyOfX3DMaterial; sourceGenericApplicationPropertyOfX3DMaterial = (this.isSetGenericApplicationPropertyOfX3DMaterial()?this.getGenericApplicationPropertyOfX3DMaterial():null); @SuppressWarnings("unchecked") List copyGenericApplicationPropertyOfX3DMaterial = ((List ) strategy.copy(LocatorUtils.property(locator, "genericApplicationPropertyOfX3DMaterial", sourceGenericApplicationPropertyOfX3DMaterial), sourceGenericApplicationPropertyOfX3DMaterial, this.isSetGenericApplicationPropertyOfX3DMaterial())); copy.unsetGenericApplicationPropertyOfX3DMaterial(); if (copyGenericApplicationPropertyOfX3DMaterial!= null) { List uniqueGenericApplicationPropertyOfX3DMateriall = copy.getGenericApplicationPropertyOfX3DMaterial(); uniqueGenericApplicationPropertyOfX3DMateriall.addAll(copyGenericApplicationPropertyOfX3DMaterial); } } else { if (genericApplicationPropertyOfX3DMaterialShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetGenericApplicationPropertyOfX3DMaterial(); } } } } return draftCopy; } public Object createNewInstance() { return new X3DMaterialType(); } 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 X3DMaterialType) { final X3DMaterialType target = this; final X3DMaterialType leftObject = ((X3DMaterialType) left); final X3DMaterialType rightObject = ((X3DMaterialType) right); { Boolean ambientIntensityShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetAmbientIntensity(), rightObject.isSetAmbientIntensity()); if (ambientIntensityShouldBeMergedAndSet == Boolean.TRUE) { Double lhsAmbientIntensity; lhsAmbientIntensity = leftObject.getAmbientIntensity(); Double rhsAmbientIntensity; rhsAmbientIntensity = rightObject.getAmbientIntensity(); Double mergedAmbientIntensity = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "ambientIntensity", lhsAmbientIntensity), LocatorUtils.property(rightLocator, "ambientIntensity", rhsAmbientIntensity), lhsAmbientIntensity, rhsAmbientIntensity, leftObject.isSetAmbientIntensity(), rightObject.isSetAmbientIntensity())); target.setAmbientIntensity(mergedAmbientIntensity); } else { if (ambientIntensityShouldBeMergedAndSet == Boolean.FALSE) { target.ambientIntensity = null; } } } { Boolean diffuseColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDiffuseColor(), rightObject.isSetDiffuseColor()); if (diffuseColorShouldBeMergedAndSet == Boolean.TRUE) { List lhsDiffuseColor; lhsDiffuseColor = (leftObject.isSetDiffuseColor()?leftObject.getDiffuseColor():null); List rhsDiffuseColor; rhsDiffuseColor = (rightObject.isSetDiffuseColor()?rightObject.getDiffuseColor():null); List mergedDiffuseColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "diffuseColor", lhsDiffuseColor), LocatorUtils.property(rightLocator, "diffuseColor", rhsDiffuseColor), lhsDiffuseColor, rhsDiffuseColor, leftObject.isSetDiffuseColor(), rightObject.isSetDiffuseColor())); target.unsetDiffuseColor(); if (mergedDiffuseColor!= null) { List uniqueDiffuseColorl = target.getDiffuseColor(); uniqueDiffuseColorl.addAll(mergedDiffuseColor); } } else { if (diffuseColorShouldBeMergedAndSet == Boolean.FALSE) { target.unsetDiffuseColor(); } } } { Boolean emissiveColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetEmissiveColor(), rightObject.isSetEmissiveColor()); if (emissiveColorShouldBeMergedAndSet == Boolean.TRUE) { List lhsEmissiveColor; lhsEmissiveColor = (leftObject.isSetEmissiveColor()?leftObject.getEmissiveColor():null); List rhsEmissiveColor; rhsEmissiveColor = (rightObject.isSetEmissiveColor()?rightObject.getEmissiveColor():null); List mergedEmissiveColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "emissiveColor", lhsEmissiveColor), LocatorUtils.property(rightLocator, "emissiveColor", rhsEmissiveColor), lhsEmissiveColor, rhsEmissiveColor, leftObject.isSetEmissiveColor(), rightObject.isSetEmissiveColor())); target.unsetEmissiveColor(); if (mergedEmissiveColor!= null) { List uniqueEmissiveColorl = target.getEmissiveColor(); uniqueEmissiveColorl.addAll(mergedEmissiveColor); } } else { if (emissiveColorShouldBeMergedAndSet == Boolean.FALSE) { target.unsetEmissiveColor(); } } } { Boolean specularColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSpecularColor(), rightObject.isSetSpecularColor()); if (specularColorShouldBeMergedAndSet == Boolean.TRUE) { List lhsSpecularColor; lhsSpecularColor = (leftObject.isSetSpecularColor()?leftObject.getSpecularColor():null); List rhsSpecularColor; rhsSpecularColor = (rightObject.isSetSpecularColor()?rightObject.getSpecularColor():null); List mergedSpecularColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "specularColor", lhsSpecularColor), LocatorUtils.property(rightLocator, "specularColor", rhsSpecularColor), lhsSpecularColor, rhsSpecularColor, leftObject.isSetSpecularColor(), rightObject.isSetSpecularColor())); target.unsetSpecularColor(); if (mergedSpecularColor!= null) { List uniqueSpecularColorl = target.getSpecularColor(); uniqueSpecularColorl.addAll(mergedSpecularColor); } } else { if (specularColorShouldBeMergedAndSet == Boolean.FALSE) { target.unsetSpecularColor(); } } } { Boolean shininessShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetShininess(), rightObject.isSetShininess()); if (shininessShouldBeMergedAndSet == Boolean.TRUE) { Double lhsShininess; lhsShininess = leftObject.getShininess(); Double rhsShininess; rhsShininess = rightObject.getShininess(); Double mergedShininess = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "shininess", lhsShininess), LocatorUtils.property(rightLocator, "shininess", rhsShininess), lhsShininess, rhsShininess, leftObject.isSetShininess(), rightObject.isSetShininess())); target.setShininess(mergedShininess); } else { if (shininessShouldBeMergedAndSet == Boolean.FALSE) { target.shininess = null; } } } { Boolean transparencyShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTransparency(), rightObject.isSetTransparency()); if (transparencyShouldBeMergedAndSet == Boolean.TRUE) { Double lhsTransparency; lhsTransparency = leftObject.getTransparency(); Double rhsTransparency; rhsTransparency = rightObject.getTransparency(); Double mergedTransparency = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "transparency", lhsTransparency), LocatorUtils.property(rightLocator, "transparency", rhsTransparency), lhsTransparency, rhsTransparency, leftObject.isSetTransparency(), rightObject.isSetTransparency())); target.setTransparency(mergedTransparency); } else { if (transparencyShouldBeMergedAndSet == Boolean.FALSE) { target.transparency = null; } } } { Boolean isSmoothShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetIsSmooth(), rightObject.isSetIsSmooth()); if (isSmoothShouldBeMergedAndSet == Boolean.TRUE) { Boolean lhsIsSmooth; lhsIsSmooth = leftObject.isIsSmooth(); Boolean rhsIsSmooth; rhsIsSmooth = rightObject.isIsSmooth(); Boolean mergedIsSmooth = ((Boolean) strategy.merge(LocatorUtils.property(leftLocator, "isSmooth", lhsIsSmooth), LocatorUtils.property(rightLocator, "isSmooth", rhsIsSmooth), lhsIsSmooth, rhsIsSmooth, leftObject.isSetIsSmooth(), rightObject.isSetIsSmooth())); target.setIsSmooth(mergedIsSmooth); } else { if (isSmoothShouldBeMergedAndSet == Boolean.FALSE) { target.isSmooth = null; } } } { Boolean targetShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTarget(), rightObject.isSetTarget()); if (targetShouldBeMergedAndSet == Boolean.TRUE) { List lhsTarget; lhsTarget = (leftObject.isSetTarget()?leftObject.getTarget():null); List rhsTarget; rhsTarget = (rightObject.isSetTarget()?rightObject.getTarget():null); List mergedTarget = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "target", lhsTarget), LocatorUtils.property(rightLocator, "target", rhsTarget), lhsTarget, rhsTarget, leftObject.isSetTarget(), rightObject.isSetTarget())); target.unsetTarget(); if (mergedTarget!= null) { List uniqueTargetl = target.getTarget(); uniqueTargetl.addAll(mergedTarget); } } else { if (targetShouldBeMergedAndSet == Boolean.FALSE) { target.unsetTarget(); } } } { Boolean genericApplicationPropertyOfX3DMaterialShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetGenericApplicationPropertyOfX3DMaterial(), rightObject.isSetGenericApplicationPropertyOfX3DMaterial()); if (genericApplicationPropertyOfX3DMaterialShouldBeMergedAndSet == Boolean.TRUE) { List lhsGenericApplicationPropertyOfX3DMaterial; lhsGenericApplicationPropertyOfX3DMaterial = (leftObject.isSetGenericApplicationPropertyOfX3DMaterial()?leftObject.getGenericApplicationPropertyOfX3DMaterial():null); List rhsGenericApplicationPropertyOfX3DMaterial; rhsGenericApplicationPropertyOfX3DMaterial = (rightObject.isSetGenericApplicationPropertyOfX3DMaterial()?rightObject.getGenericApplicationPropertyOfX3DMaterial():null); List mergedGenericApplicationPropertyOfX3DMaterial = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "genericApplicationPropertyOfX3DMaterial", lhsGenericApplicationPropertyOfX3DMaterial), LocatorUtils.property(rightLocator, "genericApplicationPropertyOfX3DMaterial", rhsGenericApplicationPropertyOfX3DMaterial), lhsGenericApplicationPropertyOfX3DMaterial, rhsGenericApplicationPropertyOfX3DMaterial, leftObject.isSetGenericApplicationPropertyOfX3DMaterial(), rightObject.isSetGenericApplicationPropertyOfX3DMaterial())); target.unsetGenericApplicationPropertyOfX3DMaterial(); if (mergedGenericApplicationPropertyOfX3DMaterial!= null) { List uniqueGenericApplicationPropertyOfX3DMateriall = target.getGenericApplicationPropertyOfX3DMaterial(); uniqueGenericApplicationPropertyOfX3DMateriall.addAll(mergedGenericApplicationPropertyOfX3DMaterial); } } else { if (genericApplicationPropertyOfX3DMaterialShouldBeMergedAndSet == Boolean.FALSE) { target.unsetGenericApplicationPropertyOfX3DMaterial(); } } } } } public void setDiffuseColor(List value) { this.diffuseColor = null; if (value!= null) { List draftl = this.getDiffuseColor(); draftl.addAll(value); } } public void setEmissiveColor(List value) { this.emissiveColor = null; if (value!= null) { List draftl = this.getEmissiveColor(); draftl.addAll(value); } } public void setSpecularColor(List value) { this.specularColor = null; if (value!= null) { List draftl = this.getSpecularColor(); draftl.addAll(value); } } public void setTarget(List value) { this.target = null; if (value!= null) { List draftl = this.getTarget(); draftl.addAll(value); } } public void setGenericApplicationPropertyOfX3DMaterial(List value) { this.genericApplicationPropertyOfX3DMaterial = null; if (value!= null) { List draftl = this.getGenericApplicationPropertyOfX3DMaterial(); draftl.addAll(value); } } public X3DMaterialType withAmbientIntensity(Double value) { setAmbientIntensity(value); return this; } public X3DMaterialType withDiffuseColor(Double... values) { if (values!= null) { for (Double value: values) { getDiffuseColor().add(value); } } return this; } public X3DMaterialType withDiffuseColor(Collection values) { if (values!= null) { getDiffuseColor().addAll(values); } return this; } public X3DMaterialType withEmissiveColor(Double... values) { if (values!= null) { for (Double value: values) { getEmissiveColor().add(value); } } return this; } public X3DMaterialType withEmissiveColor(Collection values) { if (values!= null) { getEmissiveColor().addAll(values); } return this; } public X3DMaterialType withSpecularColor(Double... values) { if (values!= null) { for (Double value: values) { getSpecularColor().add(value); } } return this; } public X3DMaterialType withSpecularColor(Collection values) { if (values!= null) { getSpecularColor().addAll(values); } return this; } public X3DMaterialType withShininess(Double value) { setShininess(value); return this; } public X3DMaterialType withTransparency(Double value) { setTransparency(value); return this; } public X3DMaterialType withIsSmooth(Boolean value) { setIsSmooth(value); return this; } public X3DMaterialType withTarget(String... values) { if (values!= null) { for (String value: values) { getTarget().add(value); } } return this; } public X3DMaterialType withTarget(Collection values) { if (values!= null) { getTarget().addAll(values); } return this; } public X3DMaterialType withGenericApplicationPropertyOfX3DMaterial(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfX3DMaterial().add(value); } } return this; } public X3DMaterialType withGenericApplicationPropertyOfX3DMaterial(Collection values) { if (values!= null) { getGenericApplicationPropertyOfX3DMaterial().addAll(values); } return this; } public X3DMaterialType withDiffuseColor(List value) { setDiffuseColor(value); return this; } public X3DMaterialType withEmissiveColor(List value) { setEmissiveColor(value); return this; } public X3DMaterialType withSpecularColor(List value) { setSpecularColor(value); return this; } public X3DMaterialType withTarget(List value) { setTarget(value); return this; } public X3DMaterialType withGenericApplicationPropertyOfX3DMaterial(List value) { setGenericApplicationPropertyOfX3DMaterial(value); return this; } @Override public X3DMaterialType withIsFront(Boolean value) { setIsFront(value); return this; } @Override public X3DMaterialType withGenericApplicationPropertyOfSurfaceData(Object... values) { if (values!= null) { for (Object value: values) { getGenericApplicationPropertyOfSurfaceData().add(value); } } return this; } @Override public X3DMaterialType withGenericApplicationPropertyOfSurfaceData(Collection values) { if (values!= null) { getGenericApplicationPropertyOfSurfaceData().addAll(values); } return this; } @Override public X3DMaterialType withGenericApplicationPropertyOfSurfaceData(List value) { setGenericApplicationPropertyOfSurfaceData(value); return this; } }