//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.07.27 at 04:06:37 PM EDT
//
package org.isotc211._19112;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
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 net.opengis.gml.v_3_2_1.AbstractFeatureType;
import net.opengis.gml.v_3_2_1.CodeType;
import net.opengis.gml.v_3_2_1.GeometryPropertyType;
import net.opengis.gml.v_3_2_1.ReferenceType;
import org.isotc211._2005.gmd.CIResponsiblePartyPropertyType;
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;
/**
* A location type type in a spatial reference system.
*
* <p>Java class for SI_LocationTypeType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SI_LocationTypeType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}AbstractFeatureType">
* <sequence>
* <element name="name" type="{http://www.isotc211.org/19112}LanguageStringType"/>
* <element name="identification" type="{http://www.opengis.net/gml/3.2}CodeType" maxOccurs="unbounded"/>
* <element name="definition" type="{http://www.isotc211.org/19112}LanguageStringType"/>
* <element name="territoryOfUse" type="{http://www.opengis.net/gml/3.2}GeometryPropertyType"/>
* <element name="owner" type="{http://www.isotc211.org/2005/gmd}CI_ResponsibleParty_PropertyType"/>
* <element name="spatialObjectType" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
* <element name="parent" type="{http://www.opengis.net/gml/3.2}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
* <element name="child" type="{http://www.opengis.net/gml/3.2}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SI_LocationTypeType", propOrder = {
"name",
"identification",
"definition",
"territoryOfUse",
"owner",
"spatialObjectType",
"parent",
"child"
})
public class SILocationTypeType
extends AbstractFeatureType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
@NotNull(message = "SILocationTypeType.name {javax.validation.constraints.NotNull.message}")
@Valid
protected LanguageStringType name;
@XmlElement(required = true)
@NotNull(message = "SILocationTypeType.identification {javax.validation.constraints.NotNull.message}")
@Size(min = 1)
@Valid
protected List<CodeType> identification;
@XmlElement(required = true)
@NotNull(message = "SILocationTypeType.definition {javax.validation.constraints.NotNull.message}")
@Valid
protected LanguageStringType definition;
@XmlElement(required = true)
@NotNull(message = "SILocationTypeType.territoryOfUse {javax.validation.constraints.NotNull.message}")
@Valid
protected GeometryPropertyType territoryOfUse;
@XmlElement(required = true)
@NotNull(message = "SILocationTypeType.owner {javax.validation.constraints.NotNull.message}")
@Valid
protected CIResponsiblePartyPropertyType owner;
@XmlSchemaType(name = "anyURI")
protected String spatialObjectType;
@Valid
protected List<ReferenceType> parent;
@Valid
protected List<ReferenceType> child;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link LanguageStringType }
*
*/
public LanguageStringType getNameProperty() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link LanguageStringType }
*
*/
public void setName(LanguageStringType value) {
this.name = value;
}
public boolean isSetName() {
return (this.name!= null);
}
/**
* Gets the value of the identification property.
*
* <p>
* 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 <CODE>set</CODE> method for the identification property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getIdentification().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CodeType }
*
*
*/
public List<CodeType> getIdentification() {
if (identification == null) {
identification = new ArrayList<CodeType>();
}
return this.identification;
}
public boolean isSetIdentification() {
return ((this.identification!= null)&&(!this.identification.isEmpty()));
}
public void unsetIdentification() {
this.identification = null;
}
/**
* Gets the value of the definition property.
*
* @return
* possible object is
* {@link LanguageStringType }
*
*/
public LanguageStringType getDefinition() {
return definition;
}
/**
* Sets the value of the definition property.
*
* @param value
* allowed object is
* {@link LanguageStringType }
*
*/
public void setDefinition(LanguageStringType value) {
this.definition = value;
}
public boolean isSetDefinition() {
return (this.definition!= null);
}
/**
* Gets the value of the territoryOfUse property.
*
* @return
* possible object is
* {@link GeometryPropertyType }
*
*/
public GeometryPropertyType getTerritoryOfUse() {
return territoryOfUse;
}
/**
* Sets the value of the territoryOfUse property.
*
* @param value
* allowed object is
* {@link GeometryPropertyType }
*
*/
public void setTerritoryOfUse(GeometryPropertyType value) {
this.territoryOfUse = value;
}
public boolean isSetTerritoryOfUse() {
return (this.territoryOfUse!= null);
}
/**
* Gets the value of the owner property.
*
* @return
* possible object is
* {@link CIResponsiblePartyPropertyType }
*
*/
public CIResponsiblePartyPropertyType getOwner() {
return owner;
}
/**
* Sets the value of the owner property.
*
* @param value
* allowed object is
* {@link CIResponsiblePartyPropertyType }
*
*/
public void setOwner(CIResponsiblePartyPropertyType value) {
this.owner = value;
}
public boolean isSetOwner() {
return (this.owner!= null);
}
/**
* Gets the value of the spatialObjectType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSpatialObjectType() {
return spatialObjectType;
}
/**
* Sets the value of the spatialObjectType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSpatialObjectType(String value) {
this.spatialObjectType = value;
}
public boolean isSetSpatialObjectType() {
return (this.spatialObjectType!= null);
}
/**
* Gets the value of the parent property.
*
* <p>
* 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 <CODE>set</CODE> method for the parent property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getParent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<ReferenceType> getParent() {
if (parent == null) {
parent = new ArrayList<ReferenceType>();
}
return this.parent;
}
public boolean isSetParent() {
return ((this.parent!= null)&&(!this.parent.isEmpty()));
}
public void unsetParent() {
this.parent = null;
}
/**
* Gets the value of the child property.
*
* <p>
* 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 <CODE>set</CODE> method for the child property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getChild().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<ReferenceType> getChild() {
if (child == null) {
child = new ArrayList<ReferenceType>();
}
return this.child;
}
public boolean isSetChild() {
return ((this.child!= null)&&(!this.child.isEmpty()));
}
public void unsetChild() {
this.child = 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);
{
LanguageStringType theName;
theName = this.getNameProperty();
strategy.appendField(locator, this, "name", buffer, theName, this.isSetName());
}
{
List<CodeType> theIdentification;
theIdentification = (this.isSetIdentification()?this.getIdentification():null);
strategy.appendField(locator, this, "identification", buffer, theIdentification, this.isSetIdentification());
}
{
LanguageStringType theDefinition;
theDefinition = this.getDefinition();
strategy.appendField(locator, this, "definition", buffer, theDefinition, this.isSetDefinition());
}
{
GeometryPropertyType theTerritoryOfUse;
theTerritoryOfUse = this.getTerritoryOfUse();
strategy.appendField(locator, this, "territoryOfUse", buffer, theTerritoryOfUse, this.isSetTerritoryOfUse());
}
{
CIResponsiblePartyPropertyType theOwner;
theOwner = this.getOwner();
strategy.appendField(locator, this, "owner", buffer, theOwner, this.isSetOwner());
}
{
String theSpatialObjectType;
theSpatialObjectType = this.getSpatialObjectType();
strategy.appendField(locator, this, "spatialObjectType", buffer, theSpatialObjectType, this.isSetSpatialObjectType());
}
{
List<ReferenceType> theParent;
theParent = (this.isSetParent()?this.getParent():null);
strategy.appendField(locator, this, "parent", buffer, theParent, this.isSetParent());
}
{
List<ReferenceType> theChild;
theChild = (this.isSetChild()?this.getChild():null);
strategy.appendField(locator, this, "child", buffer, theChild, this.isSetChild());
}
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 SILocationTypeType that = ((SILocationTypeType) object);
{
LanguageStringType lhsName;
lhsName = this.getNameProperty();
LanguageStringType rhsName;
rhsName = that.getNameProperty();
if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, this.isSetName(), that.isSetName())) {
return false;
}
}
{
List<CodeType> lhsIdentification;
lhsIdentification = (this.isSetIdentification()?this.getIdentification():null);
List<CodeType> rhsIdentification;
rhsIdentification = (that.isSetIdentification()?that.getIdentification():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "identification", lhsIdentification), LocatorUtils.property(thatLocator, "identification", rhsIdentification), lhsIdentification, rhsIdentification, this.isSetIdentification(), that.isSetIdentification())) {
return false;
}
}
{
LanguageStringType lhsDefinition;
lhsDefinition = this.getDefinition();
LanguageStringType rhsDefinition;
rhsDefinition = that.getDefinition();
if (!strategy.equals(LocatorUtils.property(thisLocator, "definition", lhsDefinition), LocatorUtils.property(thatLocator, "definition", rhsDefinition), lhsDefinition, rhsDefinition, this.isSetDefinition(), that.isSetDefinition())) {
return false;
}
}
{
GeometryPropertyType lhsTerritoryOfUse;
lhsTerritoryOfUse = this.getTerritoryOfUse();
GeometryPropertyType rhsTerritoryOfUse;
rhsTerritoryOfUse = that.getTerritoryOfUse();
if (!strategy.equals(LocatorUtils.property(thisLocator, "territoryOfUse", lhsTerritoryOfUse), LocatorUtils.property(thatLocator, "territoryOfUse", rhsTerritoryOfUse), lhsTerritoryOfUse, rhsTerritoryOfUse, this.isSetTerritoryOfUse(), that.isSetTerritoryOfUse())) {
return false;
}
}
{
CIResponsiblePartyPropertyType lhsOwner;
lhsOwner = this.getOwner();
CIResponsiblePartyPropertyType rhsOwner;
rhsOwner = that.getOwner();
if (!strategy.equals(LocatorUtils.property(thisLocator, "owner", lhsOwner), LocatorUtils.property(thatLocator, "owner", rhsOwner), lhsOwner, rhsOwner, this.isSetOwner(), that.isSetOwner())) {
return false;
}
}
{
String lhsSpatialObjectType;
lhsSpatialObjectType = this.getSpatialObjectType();
String rhsSpatialObjectType;
rhsSpatialObjectType = that.getSpatialObjectType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "spatialObjectType", lhsSpatialObjectType), LocatorUtils.property(thatLocator, "spatialObjectType", rhsSpatialObjectType), lhsSpatialObjectType, rhsSpatialObjectType, this.isSetSpatialObjectType(), that.isSetSpatialObjectType())) {
return false;
}
}
{
List<ReferenceType> lhsParent;
lhsParent = (this.isSetParent()?this.getParent():null);
List<ReferenceType> rhsParent;
rhsParent = (that.isSetParent()?that.getParent():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "parent", lhsParent), LocatorUtils.property(thatLocator, "parent", rhsParent), lhsParent, rhsParent, this.isSetParent(), that.isSetParent())) {
return false;
}
}
{
List<ReferenceType> lhsChild;
lhsChild = (this.isSetChild()?this.getChild():null);
List<ReferenceType> rhsChild;
rhsChild = (that.isSetChild()?that.getChild():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "child", lhsChild), LocatorUtils.property(thatLocator, "child", rhsChild), lhsChild, rhsChild, this.isSetChild(), that.isSetChild())) {
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);
{
LanguageStringType theName;
theName = this.getNameProperty();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, this.isSetName());
}
{
List<CodeType> theIdentification;
theIdentification = (this.isSetIdentification()?this.getIdentification():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identification", theIdentification), currentHashCode, theIdentification, this.isSetIdentification());
}
{
LanguageStringType theDefinition;
theDefinition = this.getDefinition();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "definition", theDefinition), currentHashCode, theDefinition, this.isSetDefinition());
}
{
GeometryPropertyType theTerritoryOfUse;
theTerritoryOfUse = this.getTerritoryOfUse();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "territoryOfUse", theTerritoryOfUse), currentHashCode, theTerritoryOfUse, this.isSetTerritoryOfUse());
}
{
CIResponsiblePartyPropertyType theOwner;
theOwner = this.getOwner();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "owner", theOwner), currentHashCode, theOwner, this.isSetOwner());
}
{
String theSpatialObjectType;
theSpatialObjectType = this.getSpatialObjectType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "spatialObjectType", theSpatialObjectType), currentHashCode, theSpatialObjectType, this.isSetSpatialObjectType());
}
{
List<ReferenceType> theParent;
theParent = (this.isSetParent()?this.getParent():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parent", theParent), currentHashCode, theParent, this.isSetParent());
}
{
List<ReferenceType> theChild;
theChild = (this.isSetChild()?this.getChild():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "child", theChild), currentHashCode, theChild, this.isSetChild());
}
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 SILocationTypeType) {
final SILocationTypeType copy = ((SILocationTypeType) draftCopy);
{
Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetName());
if (nameShouldBeCopiedAndSet == Boolean.TRUE) {
LanguageStringType sourceName;
sourceName = this.getNameProperty();
LanguageStringType copyName = ((LanguageStringType) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, this.isSetName()));
copy.setName(copyName);
} else {
if (nameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.name = null;
}
}
}
{
Boolean identificationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetIdentification());
if (identificationShouldBeCopiedAndSet == Boolean.TRUE) {
List<CodeType> sourceIdentification;
sourceIdentification = (this.isSetIdentification()?this.getIdentification():null);
@SuppressWarnings("unchecked")
List<CodeType> copyIdentification = ((List<CodeType> ) strategy.copy(LocatorUtils.property(locator, "identification", sourceIdentification), sourceIdentification, this.isSetIdentification()));
copy.unsetIdentification();
if (copyIdentification!= null) {
List<CodeType> uniqueIdentificationl = copy.getIdentification();
uniqueIdentificationl.addAll(copyIdentification);
}
} else {
if (identificationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetIdentification();
}
}
}
{
Boolean definitionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDefinition());
if (definitionShouldBeCopiedAndSet == Boolean.TRUE) {
LanguageStringType sourceDefinition;
sourceDefinition = this.getDefinition();
LanguageStringType copyDefinition = ((LanguageStringType) strategy.copy(LocatorUtils.property(locator, "definition", sourceDefinition), sourceDefinition, this.isSetDefinition()));
copy.setDefinition(copyDefinition);
} else {
if (definitionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.definition = null;
}
}
}
{
Boolean territoryOfUseShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTerritoryOfUse());
if (territoryOfUseShouldBeCopiedAndSet == Boolean.TRUE) {
GeometryPropertyType sourceTerritoryOfUse;
sourceTerritoryOfUse = this.getTerritoryOfUse();
GeometryPropertyType copyTerritoryOfUse = ((GeometryPropertyType) strategy.copy(LocatorUtils.property(locator, "territoryOfUse", sourceTerritoryOfUse), sourceTerritoryOfUse, this.isSetTerritoryOfUse()));
copy.setTerritoryOfUse(copyTerritoryOfUse);
} else {
if (territoryOfUseShouldBeCopiedAndSet == Boolean.FALSE) {
copy.territoryOfUse = null;
}
}
}
{
Boolean ownerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetOwner());
if (ownerShouldBeCopiedAndSet == Boolean.TRUE) {
CIResponsiblePartyPropertyType sourceOwner;
sourceOwner = this.getOwner();
CIResponsiblePartyPropertyType copyOwner = ((CIResponsiblePartyPropertyType) strategy.copy(LocatorUtils.property(locator, "owner", sourceOwner), sourceOwner, this.isSetOwner()));
copy.setOwner(copyOwner);
} else {
if (ownerShouldBeCopiedAndSet == Boolean.FALSE) {
copy.owner = null;
}
}
}
{
Boolean spatialObjectTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSpatialObjectType());
if (spatialObjectTypeShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSpatialObjectType;
sourceSpatialObjectType = this.getSpatialObjectType();
String copySpatialObjectType = ((String) strategy.copy(LocatorUtils.property(locator, "spatialObjectType", sourceSpatialObjectType), sourceSpatialObjectType, this.isSetSpatialObjectType()));
copy.setSpatialObjectType(copySpatialObjectType);
} else {
if (spatialObjectTypeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.spatialObjectType = null;
}
}
}
{
Boolean parentShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetParent());
if (parentShouldBeCopiedAndSet == Boolean.TRUE) {
List<ReferenceType> sourceParent;
sourceParent = (this.isSetParent()?this.getParent():null);
@SuppressWarnings("unchecked")
List<ReferenceType> copyParent = ((List<ReferenceType> ) strategy.copy(LocatorUtils.property(locator, "parent", sourceParent), sourceParent, this.isSetParent()));
copy.unsetParent();
if (copyParent!= null) {
List<ReferenceType> uniqueParentl = copy.getParent();
uniqueParentl.addAll(copyParent);
}
} else {
if (parentShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetParent();
}
}
}
{
Boolean childShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetChild());
if (childShouldBeCopiedAndSet == Boolean.TRUE) {
List<ReferenceType> sourceChild;
sourceChild = (this.isSetChild()?this.getChild():null);
@SuppressWarnings("unchecked")
List<ReferenceType> copyChild = ((List<ReferenceType> ) strategy.copy(LocatorUtils.property(locator, "child", sourceChild), sourceChild, this.isSetChild()));
copy.unsetChild();
if (copyChild!= null) {
List<ReferenceType> uniqueChildl = copy.getChild();
uniqueChildl.addAll(copyChild);
}
} else {
if (childShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetChild();
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new SILocationTypeType();
}
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 SILocationTypeType) {
final SILocationTypeType target = this;
final SILocationTypeType leftObject = ((SILocationTypeType) left);
final SILocationTypeType rightObject = ((SILocationTypeType) right);
{
Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetName(), rightObject.isSetName());
if (nameShouldBeMergedAndSet == Boolean.TRUE) {
LanguageStringType lhsName;
lhsName = leftObject.getNameProperty();
LanguageStringType rhsName;
rhsName = rightObject.getNameProperty();
LanguageStringType mergedName = ((LanguageStringType) 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;
}
}
}
{
Boolean identificationShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetIdentification(), rightObject.isSetIdentification());
if (identificationShouldBeMergedAndSet == Boolean.TRUE) {
List<CodeType> lhsIdentification;
lhsIdentification = (leftObject.isSetIdentification()?leftObject.getIdentification():null);
List<CodeType> rhsIdentification;
rhsIdentification = (rightObject.isSetIdentification()?rightObject.getIdentification():null);
List<CodeType> mergedIdentification = ((List<CodeType> ) strategy.merge(LocatorUtils.property(leftLocator, "identification", lhsIdentification), LocatorUtils.property(rightLocator, "identification", rhsIdentification), lhsIdentification, rhsIdentification, leftObject.isSetIdentification(), rightObject.isSetIdentification()));
target.unsetIdentification();
if (mergedIdentification!= null) {
List<CodeType> uniqueIdentificationl = target.getIdentification();
uniqueIdentificationl.addAll(mergedIdentification);
}
} else {
if (identificationShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetIdentification();
}
}
}
{
Boolean definitionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDefinition(), rightObject.isSetDefinition());
if (definitionShouldBeMergedAndSet == Boolean.TRUE) {
LanguageStringType lhsDefinition;
lhsDefinition = leftObject.getDefinition();
LanguageStringType rhsDefinition;
rhsDefinition = rightObject.getDefinition();
LanguageStringType mergedDefinition = ((LanguageStringType) strategy.merge(LocatorUtils.property(leftLocator, "definition", lhsDefinition), LocatorUtils.property(rightLocator, "definition", rhsDefinition), lhsDefinition, rhsDefinition, leftObject.isSetDefinition(), rightObject.isSetDefinition()));
target.setDefinition(mergedDefinition);
} else {
if (definitionShouldBeMergedAndSet == Boolean.FALSE) {
target.definition = null;
}
}
}
{
Boolean territoryOfUseShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTerritoryOfUse(), rightObject.isSetTerritoryOfUse());
if (territoryOfUseShouldBeMergedAndSet == Boolean.TRUE) {
GeometryPropertyType lhsTerritoryOfUse;
lhsTerritoryOfUse = leftObject.getTerritoryOfUse();
GeometryPropertyType rhsTerritoryOfUse;
rhsTerritoryOfUse = rightObject.getTerritoryOfUse();
GeometryPropertyType mergedTerritoryOfUse = ((GeometryPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "territoryOfUse", lhsTerritoryOfUse), LocatorUtils.property(rightLocator, "territoryOfUse", rhsTerritoryOfUse), lhsTerritoryOfUse, rhsTerritoryOfUse, leftObject.isSetTerritoryOfUse(), rightObject.isSetTerritoryOfUse()));
target.setTerritoryOfUse(mergedTerritoryOfUse);
} else {
if (territoryOfUseShouldBeMergedAndSet == Boolean.FALSE) {
target.territoryOfUse = null;
}
}
}
{
Boolean ownerShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetOwner(), rightObject.isSetOwner());
if (ownerShouldBeMergedAndSet == Boolean.TRUE) {
CIResponsiblePartyPropertyType lhsOwner;
lhsOwner = leftObject.getOwner();
CIResponsiblePartyPropertyType rhsOwner;
rhsOwner = rightObject.getOwner();
CIResponsiblePartyPropertyType mergedOwner = ((CIResponsiblePartyPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "owner", lhsOwner), LocatorUtils.property(rightLocator, "owner", rhsOwner), lhsOwner, rhsOwner, leftObject.isSetOwner(), rightObject.isSetOwner()));
target.setOwner(mergedOwner);
} else {
if (ownerShouldBeMergedAndSet == Boolean.FALSE) {
target.owner = null;
}
}
}
{
Boolean spatialObjectTypeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSpatialObjectType(), rightObject.isSetSpatialObjectType());
if (spatialObjectTypeShouldBeMergedAndSet == Boolean.TRUE) {
String lhsSpatialObjectType;
lhsSpatialObjectType = leftObject.getSpatialObjectType();
String rhsSpatialObjectType;
rhsSpatialObjectType = rightObject.getSpatialObjectType();
String mergedSpatialObjectType = ((String) strategy.merge(LocatorUtils.property(leftLocator, "spatialObjectType", lhsSpatialObjectType), LocatorUtils.property(rightLocator, "spatialObjectType", rhsSpatialObjectType), lhsSpatialObjectType, rhsSpatialObjectType, leftObject.isSetSpatialObjectType(), rightObject.isSetSpatialObjectType()));
target.setSpatialObjectType(mergedSpatialObjectType);
} else {
if (spatialObjectTypeShouldBeMergedAndSet == Boolean.FALSE) {
target.spatialObjectType = null;
}
}
}
{
Boolean parentShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetParent(), rightObject.isSetParent());
if (parentShouldBeMergedAndSet == Boolean.TRUE) {
List<ReferenceType> lhsParent;
lhsParent = (leftObject.isSetParent()?leftObject.getParent():null);
List<ReferenceType> rhsParent;
rhsParent = (rightObject.isSetParent()?rightObject.getParent():null);
List<ReferenceType> mergedParent = ((List<ReferenceType> ) strategy.merge(LocatorUtils.property(leftLocator, "parent", lhsParent), LocatorUtils.property(rightLocator, "parent", rhsParent), lhsParent, rhsParent, leftObject.isSetParent(), rightObject.isSetParent()));
target.unsetParent();
if (mergedParent!= null) {
List<ReferenceType> uniqueParentl = target.getParent();
uniqueParentl.addAll(mergedParent);
}
} else {
if (parentShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetParent();
}
}
}
{
Boolean childShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetChild(), rightObject.isSetChild());
if (childShouldBeMergedAndSet == Boolean.TRUE) {
List<ReferenceType> lhsChild;
lhsChild = (leftObject.isSetChild()?leftObject.getChild():null);
List<ReferenceType> rhsChild;
rhsChild = (rightObject.isSetChild()?rightObject.getChild():null);
List<ReferenceType> mergedChild = ((List<ReferenceType> ) strategy.merge(LocatorUtils.property(leftLocator, "child", lhsChild), LocatorUtils.property(rightLocator, "child", rhsChild), lhsChild, rhsChild, leftObject.isSetChild(), rightObject.isSetChild()));
target.unsetChild();
if (mergedChild!= null) {
List<ReferenceType> uniqueChildl = target.getChild();
uniqueChildl.addAll(mergedChild);
}
} else {
if (childShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetChild();
}
}
}
}
}
public void setIdentification(List<CodeType> value) {
this.identification = null;
if (value!= null) {
List<CodeType> draftl = this.getIdentification();
draftl.addAll(value);
}
}
public void setParent(List<ReferenceType> value) {
this.parent = null;
if (value!= null) {
List<ReferenceType> draftl = this.getParent();
draftl.addAll(value);
}
}
public void setChild(List<ReferenceType> value) {
this.child = null;
if (value!= null) {
List<ReferenceType> draftl = this.getChild();
draftl.addAll(value);
}
}
}