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

net.opengis.citygml.generics.v_2_0.AbstractGenericAttributeType 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 javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
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;


/**
 *  Generic (user defined) attributes may be used to represent attributes which are not covered explicitly by
 * 				the CityGML schema. Generic attributes must be used with care; they shall only be used if there is no appropiate attribute
 * 				available in the overall CityGML schema. Oherwise, problems concerning semantic interoperability may arise. A generic
 * 				attribute has a name and a value, which has further subclasses (IntAttrribute, StringAttribute, ...). 
 * 
 * 

Java class for AbstractGenericAttributeType complex type. * *

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

 * <complexType name="AbstractGenericAttributeType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *       </sequence>
 *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractGenericAttributeType") @XmlSeeAlso({ StringAttributeType.class, IntAttributeType.class, DoubleAttributeType.class, DateAttributeType.class, UriAttributeType.class, MeasureAttributeType.class, GenericAttributeSetType.class }) public abstract class AbstractGenericAttributeType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { @XmlAttribute(name = "name", required = true) protected String name; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } public boolean isSetName() { return (this.name!= 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) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, this.isSetName()); } 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; } final AbstractGenericAttributeType that = ((AbstractGenericAttributeType) object); { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, this.isSetName(), that.isSetName())) { 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 = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, this.isSetName()); } 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) { if (null == target) { throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes."); } if (target instanceof AbstractGenericAttributeType) { final AbstractGenericAttributeType copy = ((AbstractGenericAttributeType) target); { Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetName()); if (nameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceName; sourceName = this.getName(); String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, this.isSetName())); copy.setName(copyName); } else { if (nameShouldBeCopiedAndSet == Boolean.FALSE) { copy.name = null; } } } } return target; } 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) { if (right instanceof AbstractGenericAttributeType) { final AbstractGenericAttributeType target = this; final AbstractGenericAttributeType leftObject = ((AbstractGenericAttributeType) left); final AbstractGenericAttributeType rightObject = ((AbstractGenericAttributeType) right); { Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetName(), rightObject.isSetName()); if (nameShouldBeMergedAndSet == Boolean.TRUE) { String lhsName; lhsName = leftObject.getName(); String rhsName; rhsName = rightObject.getName(); String mergedName = ((String) strategy.merge(LocatorUtils.property(leftLocator, "name", lhsName), LocatorUtils.property(rightLocator, "name", rhsName), lhsName, rhsName, leftObject.isSetName(), rightObject.isSetName())); target.setName(mergedName); } else { if (nameShouldBeMergedAndSet == Boolean.FALSE) { target.name = null; } } } } } public AbstractGenericAttributeType withName(String value) { setName(value); return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy