//
// 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.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.XmlType;
import org.isotc211._2005.gco.CharacterStringPropertyType;
import org.isotc211._2005.gco.RecordPropertyType;
import org.isotc211._2005.gco.RecordTypePropertyType;
import org.isotc211._2005.gco.UnitOfMeasurePropertyType;
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;
/**
* Quantitative_conformance_measure from Quality Procedures. - - Renamed to remove implied use limitation - - OCL - -- result is type specified by valueDomain - result.tupleType = valueDomain
*
* <p>Java class for DQ_QuantitativeResult_Type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DQ_QuantitativeResult_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gmd}AbstractDQ_Result_Type">
* <sequence>
* <element name="valueType" type="{http://www.isotc211.org/2005/gco}RecordType_PropertyType" minOccurs="0"/>
* <element name="valueUnit" type="{http://www.isotc211.org/2005/gco}UnitOfMeasure_PropertyType"/>
* <element name="errorStatistic" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* <element name="value" type="{http://www.isotc211.org/2005/gco}Record_PropertyType" maxOccurs="unbounded"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DQ_QuantitativeResult_Type", propOrder = {
"valueType",
"valueUnit",
"errorStatistic",
"value"
})
public class DQQuantitativeResultType
extends AbstractDQResultType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@Valid
protected RecordTypePropertyType valueType;
@XmlElement(required = true)
@NotNull(message = "DQQuantitativeResultType.valueUnit {javax.validation.constraints.NotNull.message}")
@Valid
protected UnitOfMeasurePropertyType valueUnit;
@Valid
protected CharacterStringPropertyType errorStatistic;
@XmlElement(required = true)
@NotNull(message = "DQQuantitativeResultType.value {javax.validation.constraints.NotNull.message}")
@Size(min = 1)
@Valid
protected List<RecordPropertyType> value;
/**
* Gets the value of the valueType property.
*
* @return
* possible object is
* {@link RecordTypePropertyType }
*
*/
public RecordTypePropertyType getValueType() {
return valueType;
}
/**
* Sets the value of the valueType property.
*
* @param value
* allowed object is
* {@link RecordTypePropertyType }
*
*/
public void setValueType(RecordTypePropertyType value) {
this.valueType = value;
}
public boolean isSetValueType() {
return (this.valueType!= null);
}
/**
* Gets the value of the valueUnit property.
*
* @return
* possible object is
* {@link UnitOfMeasurePropertyType }
*
*/
public UnitOfMeasurePropertyType getValueUnit() {
return valueUnit;
}
/**
* Sets the value of the valueUnit property.
*
* @param value
* allowed object is
* {@link UnitOfMeasurePropertyType }
*
*/
public void setValueUnit(UnitOfMeasurePropertyType value) {
this.valueUnit = value;
}
public boolean isSetValueUnit() {
return (this.valueUnit!= null);
}
/**
* Gets the value of the errorStatistic property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getErrorStatistic() {
return errorStatistic;
}
/**
* Sets the value of the errorStatistic property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setErrorStatistic(CharacterStringPropertyType value) {
this.errorStatistic = value;
}
public boolean isSetErrorStatistic() {
return (this.errorStatistic!= null);
}
/**
* Gets the value of the value 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 value property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RecordPropertyType }
*
*
*/
public List<RecordPropertyType> getValue() {
if (value == null) {
value = new ArrayList<RecordPropertyType>();
}
return this.value;
}
public boolean isSetValue() {
return ((this.value!= null)&&(!this.value.isEmpty()));
}
public void unsetValue() {
this.value = 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);
{
RecordTypePropertyType theValueType;
theValueType = this.getValueType();
strategy.appendField(locator, this, "valueType", buffer, theValueType, this.isSetValueType());
}
{
UnitOfMeasurePropertyType theValueUnit;
theValueUnit = this.getValueUnit();
strategy.appendField(locator, this, "valueUnit", buffer, theValueUnit, this.isSetValueUnit());
}
{
CharacterStringPropertyType theErrorStatistic;
theErrorStatistic = this.getErrorStatistic();
strategy.appendField(locator, this, "errorStatistic", buffer, theErrorStatistic, this.isSetErrorStatistic());
}
{
List<RecordPropertyType> theValue;
theValue = (this.isSetValue()?this.getValue():null);
strategy.appendField(locator, this, "value", buffer, theValue, this.isSetValue());
}
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 DQQuantitativeResultType that = ((DQQuantitativeResultType) object);
{
RecordTypePropertyType lhsValueType;
lhsValueType = this.getValueType();
RecordTypePropertyType rhsValueType;
rhsValueType = that.getValueType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "valueType", lhsValueType), LocatorUtils.property(thatLocator, "valueType", rhsValueType), lhsValueType, rhsValueType, this.isSetValueType(), that.isSetValueType())) {
return false;
}
}
{
UnitOfMeasurePropertyType lhsValueUnit;
lhsValueUnit = this.getValueUnit();
UnitOfMeasurePropertyType rhsValueUnit;
rhsValueUnit = that.getValueUnit();
if (!strategy.equals(LocatorUtils.property(thisLocator, "valueUnit", lhsValueUnit), LocatorUtils.property(thatLocator, "valueUnit", rhsValueUnit), lhsValueUnit, rhsValueUnit, this.isSetValueUnit(), that.isSetValueUnit())) {
return false;
}
}
{
CharacterStringPropertyType lhsErrorStatistic;
lhsErrorStatistic = this.getErrorStatistic();
CharacterStringPropertyType rhsErrorStatistic;
rhsErrorStatistic = that.getErrorStatistic();
if (!strategy.equals(LocatorUtils.property(thisLocator, "errorStatistic", lhsErrorStatistic), LocatorUtils.property(thatLocator, "errorStatistic", rhsErrorStatistic), lhsErrorStatistic, rhsErrorStatistic, this.isSetErrorStatistic(), that.isSetErrorStatistic())) {
return false;
}
}
{
List<RecordPropertyType> lhsValue;
lhsValue = (this.isSetValue()?this.getValue():null);
List<RecordPropertyType> rhsValue;
rhsValue = (that.isSetValue()?that.getValue():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue, this.isSetValue(), that.isSetValue())) {
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);
{
RecordTypePropertyType theValueType;
theValueType = this.getValueType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueType", theValueType), currentHashCode, theValueType, this.isSetValueType());
}
{
UnitOfMeasurePropertyType theValueUnit;
theValueUnit = this.getValueUnit();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valueUnit", theValueUnit), currentHashCode, theValueUnit, this.isSetValueUnit());
}
{
CharacterStringPropertyType theErrorStatistic;
theErrorStatistic = this.getErrorStatistic();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "errorStatistic", theErrorStatistic), currentHashCode, theErrorStatistic, this.isSetErrorStatistic());
}
{
List<RecordPropertyType> theValue;
theValue = (this.isSetValue()?this.getValue():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue, this.isSetValue());
}
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 DQQuantitativeResultType) {
final DQQuantitativeResultType copy = ((DQQuantitativeResultType) draftCopy);
{
Boolean valueTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetValueType());
if (valueTypeShouldBeCopiedAndSet == Boolean.TRUE) {
RecordTypePropertyType sourceValueType;
sourceValueType = this.getValueType();
RecordTypePropertyType copyValueType = ((RecordTypePropertyType) strategy.copy(LocatorUtils.property(locator, "valueType", sourceValueType), sourceValueType, this.isSetValueType()));
copy.setValueType(copyValueType);
} else {
if (valueTypeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.valueType = null;
}
}
}
{
Boolean valueUnitShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetValueUnit());
if (valueUnitShouldBeCopiedAndSet == Boolean.TRUE) {
UnitOfMeasurePropertyType sourceValueUnit;
sourceValueUnit = this.getValueUnit();
UnitOfMeasurePropertyType copyValueUnit = ((UnitOfMeasurePropertyType) strategy.copy(LocatorUtils.property(locator, "valueUnit", sourceValueUnit), sourceValueUnit, this.isSetValueUnit()));
copy.setValueUnit(copyValueUnit);
} else {
if (valueUnitShouldBeCopiedAndSet == Boolean.FALSE) {
copy.valueUnit = null;
}
}
}
{
Boolean errorStatisticShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetErrorStatistic());
if (errorStatisticShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceErrorStatistic;
sourceErrorStatistic = this.getErrorStatistic();
CharacterStringPropertyType copyErrorStatistic = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "errorStatistic", sourceErrorStatistic), sourceErrorStatistic, this.isSetErrorStatistic()));
copy.setErrorStatistic(copyErrorStatistic);
} else {
if (errorStatisticShouldBeCopiedAndSet == Boolean.FALSE) {
copy.errorStatistic = null;
}
}
}
{
Boolean valueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetValue());
if (valueShouldBeCopiedAndSet == Boolean.TRUE) {
List<RecordPropertyType> sourceValue;
sourceValue = (this.isSetValue()?this.getValue():null);
@SuppressWarnings("unchecked")
List<RecordPropertyType> copyValue = ((List<RecordPropertyType> ) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, this.isSetValue()));
copy.unsetValue();
if (copyValue!= null) {
List<RecordPropertyType> uniqueValuel = copy.getValue();
uniqueValuel.addAll(copyValue);
}
} else {
if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetValue();
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new DQQuantitativeResultType();
}
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 DQQuantitativeResultType) {
final DQQuantitativeResultType target = this;
final DQQuantitativeResultType leftObject = ((DQQuantitativeResultType) left);
final DQQuantitativeResultType rightObject = ((DQQuantitativeResultType) right);
{
Boolean valueTypeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetValueType(), rightObject.isSetValueType());
if (valueTypeShouldBeMergedAndSet == Boolean.TRUE) {
RecordTypePropertyType lhsValueType;
lhsValueType = leftObject.getValueType();
RecordTypePropertyType rhsValueType;
rhsValueType = rightObject.getValueType();
RecordTypePropertyType mergedValueType = ((RecordTypePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "valueType", lhsValueType), LocatorUtils.property(rightLocator, "valueType", rhsValueType), lhsValueType, rhsValueType, leftObject.isSetValueType(), rightObject.isSetValueType()));
target.setValueType(mergedValueType);
} else {
if (valueTypeShouldBeMergedAndSet == Boolean.FALSE) {
target.valueType = null;
}
}
}
{
Boolean valueUnitShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetValueUnit(), rightObject.isSetValueUnit());
if (valueUnitShouldBeMergedAndSet == Boolean.TRUE) {
UnitOfMeasurePropertyType lhsValueUnit;
lhsValueUnit = leftObject.getValueUnit();
UnitOfMeasurePropertyType rhsValueUnit;
rhsValueUnit = rightObject.getValueUnit();
UnitOfMeasurePropertyType mergedValueUnit = ((UnitOfMeasurePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "valueUnit", lhsValueUnit), LocatorUtils.property(rightLocator, "valueUnit", rhsValueUnit), lhsValueUnit, rhsValueUnit, leftObject.isSetValueUnit(), rightObject.isSetValueUnit()));
target.setValueUnit(mergedValueUnit);
} else {
if (valueUnitShouldBeMergedAndSet == Boolean.FALSE) {
target.valueUnit = null;
}
}
}
{
Boolean errorStatisticShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetErrorStatistic(), rightObject.isSetErrorStatistic());
if (errorStatisticShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsErrorStatistic;
lhsErrorStatistic = leftObject.getErrorStatistic();
CharacterStringPropertyType rhsErrorStatistic;
rhsErrorStatistic = rightObject.getErrorStatistic();
CharacterStringPropertyType mergedErrorStatistic = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "errorStatistic", lhsErrorStatistic), LocatorUtils.property(rightLocator, "errorStatistic", rhsErrorStatistic), lhsErrorStatistic, rhsErrorStatistic, leftObject.isSetErrorStatistic(), rightObject.isSetErrorStatistic()));
target.setErrorStatistic(mergedErrorStatistic);
} else {
if (errorStatisticShouldBeMergedAndSet == Boolean.FALSE) {
target.errorStatistic = null;
}
}
}
{
Boolean valueShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetValue(), rightObject.isSetValue());
if (valueShouldBeMergedAndSet == Boolean.TRUE) {
List<RecordPropertyType> lhsValue;
lhsValue = (leftObject.isSetValue()?leftObject.getValue():null);
List<RecordPropertyType> rhsValue;
rhsValue = (rightObject.isSetValue()?rightObject.getValue():null);
List<RecordPropertyType> mergedValue = ((List<RecordPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "value", lhsValue), LocatorUtils.property(rightLocator, "value", rhsValue), lhsValue, rhsValue, leftObject.isSetValue(), rightObject.isSetValue()));
target.unsetValue();
if (mergedValue!= null) {
List<RecordPropertyType> uniqueValuel = target.getValue();
uniqueValuel.addAll(mergedValue);
}
} else {
if (valueShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetValue();
}
}
}
}
}
public void setValue(List<RecordPropertyType> value) {
this.value = null;
if (value!= null) {
List<RecordPropertyType> draftl = this.getValue();
draftl.addAll(value);
}
}
}