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

net.opengis.citygml.generics.v_2_0.GenericAttributeSetType 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.generics.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.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
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;


/**
 * Set of generic attributes with an optional codeSpace. If the codeSpace attribute is present, then its
 * 				value should identify an authority for the set, such as the organisation or community who defined its content. The generic
 * 				attribute set may contain arbitrary generic attributes.
 * 
 * 

Java class for GenericAttributeSetType complex type. * *

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

 * <complexType name="GenericAttributeSetType">
 *   <complexContent>
 *     <extension base="{http://www.opengis.net/citygml/generics/2.0}AbstractGenericAttributeType">
 *       <sequence>
 *         <element ref="{http://www.opengis.net/citygml/generics/2.0}_genericAttribute" maxOccurs="unbounded"/>
 *       </sequence>
 *       <attribute name="codeSpace" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GenericAttributeSetType", propOrder = { "genericAttribute" }) public class GenericAttributeSetType extends AbstractGenericAttributeType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { @XmlElementRef(name = "_genericAttribute", namespace = "http://www.opengis.net/citygml/generics/2.0", type = JAXBElement.class) protected List> genericAttribute; @XmlAttribute(name = "codeSpace") @XmlSchemaType(name = "anyURI") protected String codeSpace; /** * Gets the value of the genericAttribute 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 genericAttribute property. * *

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

     *    getGenericAttribute().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link DoubleAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link StringAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link GenericAttributeSetType }{@code >} * {@link JAXBElement }{@code <}{@link DateAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link IntAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link UriAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractGenericAttributeType }{@code >} * {@link JAXBElement }{@code <}{@link MeasureAttributeType }{@code >} * * */ public List> getGenericAttribute() { if (genericAttribute == null) { genericAttribute = new ArrayList>(); } return this.genericAttribute; } public boolean isSetGenericAttribute() { return ((this.genericAttribute!= null)&&(!this.genericAttribute.isEmpty())); } public void unsetGenericAttribute() { this.genericAttribute = null; } /** * Gets the value of the codeSpace property. * * @return * possible object is * {@link String } * */ public String getCodeSpace() { return codeSpace; } /** * Sets the value of the codeSpace property. * * @param value * allowed object is * {@link String } * */ public void setCodeSpace(String value) { this.codeSpace = value; } public boolean isSetCodeSpace() { return (this.codeSpace!= 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); { List> theGenericAttribute; theGenericAttribute = (this.isSetGenericAttribute()?this.getGenericAttribute():null); strategy.appendField(locator, this, "genericAttribute", buffer, theGenericAttribute, this.isSetGenericAttribute()); } { String theCodeSpace; theCodeSpace = this.getCodeSpace(); strategy.appendField(locator, this, "codeSpace", buffer, theCodeSpace, this.isSetCodeSpace()); } 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 GenericAttributeSetType that = ((GenericAttributeSetType) object); { List> lhsGenericAttribute; lhsGenericAttribute = (this.isSetGenericAttribute()?this.getGenericAttribute():null); List> rhsGenericAttribute; rhsGenericAttribute = (that.isSetGenericAttribute()?that.getGenericAttribute():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "genericAttribute", lhsGenericAttribute), LocatorUtils.property(thatLocator, "genericAttribute", rhsGenericAttribute), lhsGenericAttribute, rhsGenericAttribute, this.isSetGenericAttribute(), that.isSetGenericAttribute())) { return false; } } { String lhsCodeSpace; lhsCodeSpace = this.getCodeSpace(); String rhsCodeSpace; rhsCodeSpace = that.getCodeSpace(); if (!strategy.equals(LocatorUtils.property(thisLocator, "codeSpace", lhsCodeSpace), LocatorUtils.property(thatLocator, "codeSpace", rhsCodeSpace), lhsCodeSpace, rhsCodeSpace, this.isSetCodeSpace(), that.isSetCodeSpace())) { 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); { List> theGenericAttribute; theGenericAttribute = (this.isSetGenericAttribute()?this.getGenericAttribute():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "genericAttribute", theGenericAttribute), currentHashCode, theGenericAttribute, this.isSetGenericAttribute()); } { String theCodeSpace; theCodeSpace = this.getCodeSpace(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "codeSpace", theCodeSpace), currentHashCode, theCodeSpace, this.isSetCodeSpace()); } 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 GenericAttributeSetType) { final GenericAttributeSetType copy = ((GenericAttributeSetType) draftCopy); { Boolean genericAttributeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetGenericAttribute()); if (genericAttributeShouldBeCopiedAndSet == Boolean.TRUE) { List> sourceGenericAttribute; sourceGenericAttribute = (this.isSetGenericAttribute()?this.getGenericAttribute():null); @SuppressWarnings("unchecked") List> copyGenericAttribute = ((List> ) strategy.copy(LocatorUtils.property(locator, "genericAttribute", sourceGenericAttribute), sourceGenericAttribute, this.isSetGenericAttribute())); copy.unsetGenericAttribute(); if (copyGenericAttribute!= null) { List> uniqueGenericAttributel = copy.getGenericAttribute(); uniqueGenericAttributel.addAll(copyGenericAttribute); } } else { if (genericAttributeShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetGenericAttribute(); } } } { Boolean codeSpaceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetCodeSpace()); if (codeSpaceShouldBeCopiedAndSet == Boolean.TRUE) { String sourceCodeSpace; sourceCodeSpace = this.getCodeSpace(); String copyCodeSpace = ((String) strategy.copy(LocatorUtils.property(locator, "codeSpace", sourceCodeSpace), sourceCodeSpace, this.isSetCodeSpace())); copy.setCodeSpace(copyCodeSpace); } else { if (codeSpaceShouldBeCopiedAndSet == Boolean.FALSE) { copy.codeSpace = null; } } } } return draftCopy; } public Object createNewInstance() { return new GenericAttributeSetType(); } 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 GenericAttributeSetType) { final GenericAttributeSetType target = this; final GenericAttributeSetType leftObject = ((GenericAttributeSetType) left); final GenericAttributeSetType rightObject = ((GenericAttributeSetType) right); { Boolean genericAttributeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetGenericAttribute(), rightObject.isSetGenericAttribute()); if (genericAttributeShouldBeMergedAndSet == Boolean.TRUE) { List> lhsGenericAttribute; lhsGenericAttribute = (leftObject.isSetGenericAttribute()?leftObject.getGenericAttribute():null); List> rhsGenericAttribute; rhsGenericAttribute = (rightObject.isSetGenericAttribute()?rightObject.getGenericAttribute():null); List> mergedGenericAttribute = ((List> ) strategy.merge(LocatorUtils.property(leftLocator, "genericAttribute", lhsGenericAttribute), LocatorUtils.property(rightLocator, "genericAttribute", rhsGenericAttribute), lhsGenericAttribute, rhsGenericAttribute, leftObject.isSetGenericAttribute(), rightObject.isSetGenericAttribute())); target.unsetGenericAttribute(); if (mergedGenericAttribute!= null) { List> uniqueGenericAttributel = target.getGenericAttribute(); uniqueGenericAttributel.addAll(mergedGenericAttribute); } } else { if (genericAttributeShouldBeMergedAndSet == Boolean.FALSE) { target.unsetGenericAttribute(); } } } { Boolean codeSpaceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetCodeSpace(), rightObject.isSetCodeSpace()); if (codeSpaceShouldBeMergedAndSet == Boolean.TRUE) { String lhsCodeSpace; lhsCodeSpace = leftObject.getCodeSpace(); String rhsCodeSpace; rhsCodeSpace = rightObject.getCodeSpace(); String mergedCodeSpace = ((String) strategy.merge(LocatorUtils.property(leftLocator, "codeSpace", lhsCodeSpace), LocatorUtils.property(rightLocator, "codeSpace", rhsCodeSpace), lhsCodeSpace, rhsCodeSpace, leftObject.isSetCodeSpace(), rightObject.isSetCodeSpace())); target.setCodeSpace(mergedCodeSpace); } else { if (codeSpaceShouldBeMergedAndSet == Boolean.FALSE) { target.codeSpace = null; } } } } } public void setGenericAttribute(List> value) { this.genericAttribute = null; if (value!= null) { List> draftl = this.getGenericAttribute(); draftl.addAll(value); } } public GenericAttributeSetType withGenericAttribute(JAXBElement ... values) { if (values!= null) { for (JAXBElement value: values) { getGenericAttribute().add(value); } } return this; } public GenericAttributeSetType withGenericAttribute(Collection> values) { if (values!= null) { getGenericAttribute().addAll(values); } return this; } public GenericAttributeSetType withCodeSpace(String value) { setCodeSpace(value); return this; } public GenericAttributeSetType withGenericAttribute(List> value) { setGenericAttribute(value); return this; } @Override public GenericAttributeSetType withName(String value) { setName(value); return this; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy