net.opengis.citygml.v_2_0.ExternalReferenceType 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.v_2_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
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;
/**
* Type describing the reference to an corresponding object in an other information system, for example in
* the german cadastre ALKIS, the german topographic information system or ATKIS, or the OS MasterMap. The reference consists
* of the name of the external information system, represented by an URI, and the reference of the external object, given
* either by a string or by an URI. If the informationSystem element is missing in the ExternalReference, the
* ExternalObjectReference must be an URI, which contains an indication of the informationSystem.
*
* Java class for ExternalReferenceType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="ExternalReferenceType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="informationSystem" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
* <element name="externalObject" type="{http://www.opengis.net/citygml/2.0}ExternalObjectReferenceType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExternalReferenceType", propOrder = {
"informationSystem",
"externalObject"
})
public class ExternalReferenceType implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
@XmlSchemaType(name = "anyURI")
protected String informationSystem;
@XmlElement(required = true)
protected ExternalObjectReferenceType externalObject;
/**
* Gets the value of the informationSystem property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInformationSystem() {
return informationSystem;
}
/**
* Sets the value of the informationSystem property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInformationSystem(String value) {
this.informationSystem = value;
}
public boolean isSetInformationSystem() {
return (this.informationSystem!= null);
}
/**
* Gets the value of the externalObject property.
*
* @return
* possible object is
* {@link ExternalObjectReferenceType }
*
*/
public ExternalObjectReferenceType getExternalObject() {
return externalObject;
}
/**
* Sets the value of the externalObject property.
*
* @param value
* allowed object is
* {@link ExternalObjectReferenceType }
*
*/
public void setExternalObject(ExternalObjectReferenceType value) {
this.externalObject = value;
}
public boolean isSetExternalObject() {
return (this.externalObject!= 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 theInformationSystem;
theInformationSystem = this.getInformationSystem();
strategy.appendField(locator, this, "informationSystem", buffer, theInformationSystem, this.isSetInformationSystem());
}
{
ExternalObjectReferenceType theExternalObject;
theExternalObject = this.getExternalObject();
strategy.appendField(locator, this, "externalObject", buffer, theExternalObject, this.isSetExternalObject());
}
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 ExternalReferenceType that = ((ExternalReferenceType) object);
{
String lhsInformationSystem;
lhsInformationSystem = this.getInformationSystem();
String rhsInformationSystem;
rhsInformationSystem = that.getInformationSystem();
if (!strategy.equals(LocatorUtils.property(thisLocator, "informationSystem", lhsInformationSystem), LocatorUtils.property(thatLocator, "informationSystem", rhsInformationSystem), lhsInformationSystem, rhsInformationSystem, this.isSetInformationSystem(), that.isSetInformationSystem())) {
return false;
}
}
{
ExternalObjectReferenceType lhsExternalObject;
lhsExternalObject = this.getExternalObject();
ExternalObjectReferenceType rhsExternalObject;
rhsExternalObject = that.getExternalObject();
if (!strategy.equals(LocatorUtils.property(thisLocator, "externalObject", lhsExternalObject), LocatorUtils.property(thatLocator, "externalObject", rhsExternalObject), lhsExternalObject, rhsExternalObject, this.isSetExternalObject(), that.isSetExternalObject())) {
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 theInformationSystem;
theInformationSystem = this.getInformationSystem();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "informationSystem", theInformationSystem), currentHashCode, theInformationSystem, this.isSetInformationSystem());
}
{
ExternalObjectReferenceType theExternalObject;
theExternalObject = this.getExternalObject();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "externalObject", theExternalObject), currentHashCode, theExternalObject, this.isSetExternalObject());
}
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);
if (draftCopy instanceof ExternalReferenceType) {
final ExternalReferenceType copy = ((ExternalReferenceType) draftCopy);
{
Boolean informationSystemShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetInformationSystem());
if (informationSystemShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceInformationSystem;
sourceInformationSystem = this.getInformationSystem();
String copyInformationSystem = ((String) strategy.copy(LocatorUtils.property(locator, "informationSystem", sourceInformationSystem), sourceInformationSystem, this.isSetInformationSystem()));
copy.setInformationSystem(copyInformationSystem);
} else {
if (informationSystemShouldBeCopiedAndSet == Boolean.FALSE) {
copy.informationSystem = null;
}
}
}
{
Boolean externalObjectShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetExternalObject());
if (externalObjectShouldBeCopiedAndSet == Boolean.TRUE) {
ExternalObjectReferenceType sourceExternalObject;
sourceExternalObject = this.getExternalObject();
ExternalObjectReferenceType copyExternalObject = ((ExternalObjectReferenceType) strategy.copy(LocatorUtils.property(locator, "externalObject", sourceExternalObject), sourceExternalObject, this.isSetExternalObject()));
copy.setExternalObject(copyExternalObject);
} else {
if (externalObjectShouldBeCopiedAndSet == Boolean.FALSE) {
copy.externalObject = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new ExternalReferenceType();
}
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 ExternalReferenceType) {
final ExternalReferenceType target = this;
final ExternalReferenceType leftObject = ((ExternalReferenceType) left);
final ExternalReferenceType rightObject = ((ExternalReferenceType) right);
{
Boolean informationSystemShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetInformationSystem(), rightObject.isSetInformationSystem());
if (informationSystemShouldBeMergedAndSet == Boolean.TRUE) {
String lhsInformationSystem;
lhsInformationSystem = leftObject.getInformationSystem();
String rhsInformationSystem;
rhsInformationSystem = rightObject.getInformationSystem();
String mergedInformationSystem = ((String) strategy.merge(LocatorUtils.property(leftLocator, "informationSystem", lhsInformationSystem), LocatorUtils.property(rightLocator, "informationSystem", rhsInformationSystem), lhsInformationSystem, rhsInformationSystem, leftObject.isSetInformationSystem(), rightObject.isSetInformationSystem()));
target.setInformationSystem(mergedInformationSystem);
} else {
if (informationSystemShouldBeMergedAndSet == Boolean.FALSE) {
target.informationSystem = null;
}
}
}
{
Boolean externalObjectShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetExternalObject(), rightObject.isSetExternalObject());
if (externalObjectShouldBeMergedAndSet == Boolean.TRUE) {
ExternalObjectReferenceType lhsExternalObject;
lhsExternalObject = leftObject.getExternalObject();
ExternalObjectReferenceType rhsExternalObject;
rhsExternalObject = rightObject.getExternalObject();
ExternalObjectReferenceType mergedExternalObject = ((ExternalObjectReferenceType) strategy.merge(LocatorUtils.property(leftLocator, "externalObject", lhsExternalObject), LocatorUtils.property(rightLocator, "externalObject", rhsExternalObject), lhsExternalObject, rhsExternalObject, leftObject.isSetExternalObject(), rightObject.isSetExternalObject()));
target.setExternalObject(mergedExternalObject);
} else {
if (externalObjectShouldBeMergedAndSet == Boolean.FALSE) {
target.externalObject = null;
}
}
}
}
}
public ExternalReferenceType withInformationSystem(String value) {
setInformationSystem(value);
return this;
}
public ExternalReferenceType withExternalObject(ExternalObjectReferenceType value) {
setExternalObject(value);
return this;
}
}