//
// 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._2005.gmd;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import org.isotc211._2005.gco.AbstractObjectType;
import org.isotc211._2005.gco.CharacterStringPropertyType;
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;
/**
* <p>Java class for LI_Lineage_Type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LI_Lineage_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type">
* <sequence>
* <element name="statement" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* <element name="processStep" type="{http://www.isotc211.org/2005/gmd}LI_ProcessStep_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
* <element name="source" type="{http://www.isotc211.org/2005/gmd}LI_Source_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LI_Lineage_Type", propOrder = {
"statement",
"processStep",
"source"
})
public class LILineageType
extends AbstractObjectType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@Valid
protected CharacterStringPropertyType statement;
@Valid
protected List<LIProcessStepPropertyType> processStep;
@Valid
protected List<LISourcePropertyType> source;
/**
* Gets the value of the statement property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getStatement() {
return statement;
}
/**
* Sets the value of the statement property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setStatement(CharacterStringPropertyType value) {
this.statement = value;
}
public boolean isSetStatement() {
return (this.statement!= null);
}
/**
* Gets the value of the processStep 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 processStep property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getProcessStep().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link LIProcessStepPropertyType }
*
*
*/
public List<LIProcessStepPropertyType> getProcessStep() {
if (processStep == null) {
processStep = new ArrayList<LIProcessStepPropertyType>();
}
return this.processStep;
}
public boolean isSetProcessStep() {
return ((this.processStep!= null)&&(!this.processStep.isEmpty()));
}
public void unsetProcessStep() {
this.processStep = null;
}
/**
* Gets the value of the source 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 source property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSource().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link LISourcePropertyType }
*
*
*/
public List<LISourcePropertyType> getSource() {
if (source == null) {
source = new ArrayList<LISourcePropertyType>();
}
return this.source;
}
public boolean isSetSource() {
return ((this.source!= null)&&(!this.source.isEmpty()));
}
public void unsetSource() {
this.source = 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);
{
CharacterStringPropertyType theStatement;
theStatement = this.getStatement();
strategy.appendField(locator, this, "statement", buffer, theStatement, this.isSetStatement());
}
{
List<LIProcessStepPropertyType> theProcessStep;
theProcessStep = (this.isSetProcessStep()?this.getProcessStep():null);
strategy.appendField(locator, this, "processStep", buffer, theProcessStep, this.isSetProcessStep());
}
{
List<LISourcePropertyType> theSource;
theSource = (this.isSetSource()?this.getSource():null);
strategy.appendField(locator, this, "source", buffer, theSource, this.isSetSource());
}
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 LILineageType that = ((LILineageType) object);
{
CharacterStringPropertyType lhsStatement;
lhsStatement = this.getStatement();
CharacterStringPropertyType rhsStatement;
rhsStatement = that.getStatement();
if (!strategy.equals(LocatorUtils.property(thisLocator, "statement", lhsStatement), LocatorUtils.property(thatLocator, "statement", rhsStatement), lhsStatement, rhsStatement, this.isSetStatement(), that.isSetStatement())) {
return false;
}
}
{
List<LIProcessStepPropertyType> lhsProcessStep;
lhsProcessStep = (this.isSetProcessStep()?this.getProcessStep():null);
List<LIProcessStepPropertyType> rhsProcessStep;
rhsProcessStep = (that.isSetProcessStep()?that.getProcessStep():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "processStep", lhsProcessStep), LocatorUtils.property(thatLocator, "processStep", rhsProcessStep), lhsProcessStep, rhsProcessStep, this.isSetProcessStep(), that.isSetProcessStep())) {
return false;
}
}
{
List<LISourcePropertyType> lhsSource;
lhsSource = (this.isSetSource()?this.getSource():null);
List<LISourcePropertyType> rhsSource;
rhsSource = (that.isSetSource()?that.getSource():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, this.isSetSource(), that.isSetSource())) {
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);
{
CharacterStringPropertyType theStatement;
theStatement = this.getStatement();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "statement", theStatement), currentHashCode, theStatement, this.isSetStatement());
}
{
List<LIProcessStepPropertyType> theProcessStep;
theProcessStep = (this.isSetProcessStep()?this.getProcessStep():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "processStep", theProcessStep), currentHashCode, theProcessStep, this.isSetProcessStep());
}
{
List<LISourcePropertyType> theSource;
theSource = (this.isSetSource()?this.getSource():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, this.isSetSource());
}
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 LILineageType) {
final LILineageType copy = ((LILineageType) draftCopy);
{
Boolean statementShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetStatement());
if (statementShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceStatement;
sourceStatement = this.getStatement();
CharacterStringPropertyType copyStatement = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "statement", sourceStatement), sourceStatement, this.isSetStatement()));
copy.setStatement(copyStatement);
} else {
if (statementShouldBeCopiedAndSet == Boolean.FALSE) {
copy.statement = null;
}
}
}
{
Boolean processStepShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetProcessStep());
if (processStepShouldBeCopiedAndSet == Boolean.TRUE) {
List<LIProcessStepPropertyType> sourceProcessStep;
sourceProcessStep = (this.isSetProcessStep()?this.getProcessStep():null);
@SuppressWarnings("unchecked")
List<LIProcessStepPropertyType> copyProcessStep = ((List<LIProcessStepPropertyType> ) strategy.copy(LocatorUtils.property(locator, "processStep", sourceProcessStep), sourceProcessStep, this.isSetProcessStep()));
copy.unsetProcessStep();
if (copyProcessStep!= null) {
List<LIProcessStepPropertyType> uniqueProcessStepl = copy.getProcessStep();
uniqueProcessStepl.addAll(copyProcessStep);
}
} else {
if (processStepShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetProcessStep();
}
}
}
{
Boolean sourceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSource());
if (sourceShouldBeCopiedAndSet == Boolean.TRUE) {
List<LISourcePropertyType> sourceSource;
sourceSource = (this.isSetSource()?this.getSource():null);
@SuppressWarnings("unchecked")
List<LISourcePropertyType> copySource = ((List<LISourcePropertyType> ) strategy.copy(LocatorUtils.property(locator, "source", sourceSource), sourceSource, this.isSetSource()));
copy.unsetSource();
if (copySource!= null) {
List<LISourcePropertyType> uniqueSourcel = copy.getSource();
uniqueSourcel.addAll(copySource);
}
} else {
if (sourceShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetSource();
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new LILineageType();
}
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 LILineageType) {
final LILineageType target = this;
final LILineageType leftObject = ((LILineageType) left);
final LILineageType rightObject = ((LILineageType) right);
{
Boolean statementShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetStatement(), rightObject.isSetStatement());
if (statementShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsStatement;
lhsStatement = leftObject.getStatement();
CharacterStringPropertyType rhsStatement;
rhsStatement = rightObject.getStatement();
CharacterStringPropertyType mergedStatement = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "statement", lhsStatement), LocatorUtils.property(rightLocator, "statement", rhsStatement), lhsStatement, rhsStatement, leftObject.isSetStatement(), rightObject.isSetStatement()));
target.setStatement(mergedStatement);
} else {
if (statementShouldBeMergedAndSet == Boolean.FALSE) {
target.statement = null;
}
}
}
{
Boolean processStepShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetProcessStep(), rightObject.isSetProcessStep());
if (processStepShouldBeMergedAndSet == Boolean.TRUE) {
List<LIProcessStepPropertyType> lhsProcessStep;
lhsProcessStep = (leftObject.isSetProcessStep()?leftObject.getProcessStep():null);
List<LIProcessStepPropertyType> rhsProcessStep;
rhsProcessStep = (rightObject.isSetProcessStep()?rightObject.getProcessStep():null);
List<LIProcessStepPropertyType> mergedProcessStep = ((List<LIProcessStepPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "processStep", lhsProcessStep), LocatorUtils.property(rightLocator, "processStep", rhsProcessStep), lhsProcessStep, rhsProcessStep, leftObject.isSetProcessStep(), rightObject.isSetProcessStep()));
target.unsetProcessStep();
if (mergedProcessStep!= null) {
List<LIProcessStepPropertyType> uniqueProcessStepl = target.getProcessStep();
uniqueProcessStepl.addAll(mergedProcessStep);
}
} else {
if (processStepShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetProcessStep();
}
}
}
{
Boolean sourceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSource(), rightObject.isSetSource());
if (sourceShouldBeMergedAndSet == Boolean.TRUE) {
List<LISourcePropertyType> lhsSource;
lhsSource = (leftObject.isSetSource()?leftObject.getSource():null);
List<LISourcePropertyType> rhsSource;
rhsSource = (rightObject.isSetSource()?rightObject.getSource():null);
List<LISourcePropertyType> mergedSource = ((List<LISourcePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "source", lhsSource), LocatorUtils.property(rightLocator, "source", rhsSource), lhsSource, rhsSource, leftObject.isSetSource(), rightObject.isSetSource()));
target.unsetSource();
if (mergedSource!= null) {
List<LISourcePropertyType> uniqueSourcel = target.getSource();
uniqueSourcel.addAll(mergedSource);
}
} else {
if (sourceShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetSource();
}
}
}
}
}
public void setProcessStep(List<LIProcessStepPropertyType> value) {
this.processStep = null;
if (value!= null) {
List<LIProcessStepPropertyType> draftl = this.getProcessStep();
draftl.addAll(value);
}
}
public void setSource(List<LISourcePropertyType> value) {
this.source = null;
if (value!= null) {
List<LISourcePropertyType> draftl = this.getSource();
draftl.addAll(value);
}
}
}