// // 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.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import org.isotc211._2005.gco.AbstractObjectType; 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; /** * Identifiable collection of datasets * * <p>Java class for AbstractDS_Aggregate_Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="AbstractDS_Aggregate_Type"> * <complexContent> * <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type"> * <sequence> * <element name="composedOf" type="{http://www.isotc211.org/2005/gmd}DS_DataSet_PropertyType" maxOccurs="unbounded"/> * <element name="seriesMetadata" type="{http://www.isotc211.org/2005/gmd}MD_Metadata_PropertyType" maxOccurs="unbounded"/> * <element name="subset" type="{http://www.isotc211.org/2005/gmd}DS_Aggregate_PropertyType" maxOccurs="unbounded" minOccurs="0"/> * <element name="superset" type="{http://www.isotc211.org/2005/gmd}DS_Aggregate_PropertyType" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractDS_Aggregate_Type", propOrder = { "composedOf", "seriesMetadata", "subset", "superset" }) @XmlSeeAlso({ DSInitiativeType.class, DSSeriesType.class, DSOtherAggregateType.class }) public abstract class AbstractDSAggregateType extends AbstractObjectType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(required = true) @NotNull(message = "AbstractDSAggregateType.composedOf {javax.validation.constraints.NotNull.message}") @Size(min = 1) @Valid protected List<DSDataSetPropertyType> composedOf; @XmlElement(required = true) @NotNull(message = "AbstractDSAggregateType.seriesMetadata {javax.validation.constraints.NotNull.message}") @Size(min = 1) @Valid protected List<MDMetadataPropertyType> seriesMetadata; @Valid protected List<DSAggregatePropertyType> subset; @Valid protected List<DSAggregatePropertyType> superset; /** * Gets the value of the composedOf 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 composedOf property. * * <p> * For example, to add a new item, do as follows: * <pre> * getComposedOf().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link DSDataSetPropertyType } * * */ public List<DSDataSetPropertyType> getComposedOf() { if (composedOf == null) { composedOf = new ArrayList<DSDataSetPropertyType>(); } return this.composedOf; } public boolean isSetComposedOf() { return ((this.composedOf!= null)&&(!this.composedOf.isEmpty())); } public void unsetComposedOf() { this.composedOf = null; } /** * Gets the value of the seriesMetadata 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 seriesMetadata property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSeriesMetadata().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link MDMetadataPropertyType } * * */ public List<MDMetadataPropertyType> getSeriesMetadata() { if (seriesMetadata == null) { seriesMetadata = new ArrayList<MDMetadataPropertyType>(); } return this.seriesMetadata; } public boolean isSetSeriesMetadata() { return ((this.seriesMetadata!= null)&&(!this.seriesMetadata.isEmpty())); } public void unsetSeriesMetadata() { this.seriesMetadata = null; } /** * Gets the value of the subset 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 subset property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubset().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link DSAggregatePropertyType } * * */ public List<DSAggregatePropertyType> getSubset() { if (subset == null) { subset = new ArrayList<DSAggregatePropertyType>(); } return this.subset; } public boolean isSetSubset() { return ((this.subset!= null)&&(!this.subset.isEmpty())); } public void unsetSubset() { this.subset = null; } /** * Gets the value of the superset 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 superset property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSuperset().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link DSAggregatePropertyType } * * */ public List<DSAggregatePropertyType> getSuperset() { if (superset == null) { superset = new ArrayList<DSAggregatePropertyType>(); } return this.superset; } public boolean isSetSuperset() { return ((this.superset!= null)&&(!this.superset.isEmpty())); } public void unsetSuperset() { this.superset = 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); { List<DSDataSetPropertyType> theComposedOf; theComposedOf = (this.isSetComposedOf()?this.getComposedOf():null); strategy.appendField(locator, this, "composedOf", buffer, theComposedOf, this.isSetComposedOf()); } { List<MDMetadataPropertyType> theSeriesMetadata; theSeriesMetadata = (this.isSetSeriesMetadata()?this.getSeriesMetadata():null); strategy.appendField(locator, this, "seriesMetadata", buffer, theSeriesMetadata, this.isSetSeriesMetadata()); } { List<DSAggregatePropertyType> theSubset; theSubset = (this.isSetSubset()?this.getSubset():null); strategy.appendField(locator, this, "subset", buffer, theSubset, this.isSetSubset()); } { List<DSAggregatePropertyType> theSuperset; theSuperset = (this.isSetSuperset()?this.getSuperset():null); strategy.appendField(locator, this, "superset", buffer, theSuperset, this.isSetSuperset()); } 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 AbstractDSAggregateType that = ((AbstractDSAggregateType) object); { List<DSDataSetPropertyType> lhsComposedOf; lhsComposedOf = (this.isSetComposedOf()?this.getComposedOf():null); List<DSDataSetPropertyType> rhsComposedOf; rhsComposedOf = (that.isSetComposedOf()?that.getComposedOf():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "composedOf", lhsComposedOf), LocatorUtils.property(thatLocator, "composedOf", rhsComposedOf), lhsComposedOf, rhsComposedOf, this.isSetComposedOf(), that.isSetComposedOf())) { return false; } } { List<MDMetadataPropertyType> lhsSeriesMetadata; lhsSeriesMetadata = (this.isSetSeriesMetadata()?this.getSeriesMetadata():null); List<MDMetadataPropertyType> rhsSeriesMetadata; rhsSeriesMetadata = (that.isSetSeriesMetadata()?that.getSeriesMetadata():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "seriesMetadata", lhsSeriesMetadata), LocatorUtils.property(thatLocator, "seriesMetadata", rhsSeriesMetadata), lhsSeriesMetadata, rhsSeriesMetadata, this.isSetSeriesMetadata(), that.isSetSeriesMetadata())) { return false; } } { List<DSAggregatePropertyType> lhsSubset; lhsSubset = (this.isSetSubset()?this.getSubset():null); List<DSAggregatePropertyType> rhsSubset; rhsSubset = (that.isSetSubset()?that.getSubset():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "subset", lhsSubset), LocatorUtils.property(thatLocator, "subset", rhsSubset), lhsSubset, rhsSubset, this.isSetSubset(), that.isSetSubset())) { return false; } } { List<DSAggregatePropertyType> lhsSuperset; lhsSuperset = (this.isSetSuperset()?this.getSuperset():null); List<DSAggregatePropertyType> rhsSuperset; rhsSuperset = (that.isSetSuperset()?that.getSuperset():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "superset", lhsSuperset), LocatorUtils.property(thatLocator, "superset", rhsSuperset), lhsSuperset, rhsSuperset, this.isSetSuperset(), that.isSetSuperset())) { 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); { List<DSDataSetPropertyType> theComposedOf; theComposedOf = (this.isSetComposedOf()?this.getComposedOf():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "composedOf", theComposedOf), currentHashCode, theComposedOf, this.isSetComposedOf()); } { List<MDMetadataPropertyType> theSeriesMetadata; theSeriesMetadata = (this.isSetSeriesMetadata()?this.getSeriesMetadata():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "seriesMetadata", theSeriesMetadata), currentHashCode, theSeriesMetadata, this.isSetSeriesMetadata()); } { List<DSAggregatePropertyType> theSubset; theSubset = (this.isSetSubset()?this.getSubset():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subset", theSubset), currentHashCode, theSubset, this.isSetSubset()); } { List<DSAggregatePropertyType> theSuperset; theSuperset = (this.isSetSuperset()?this.getSuperset():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "superset", theSuperset), currentHashCode, theSuperset, this.isSetSuperset()); } 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."); } super.copyTo(locator, target, strategy); if (target instanceof AbstractDSAggregateType) { final AbstractDSAggregateType copy = ((AbstractDSAggregateType) target); { Boolean composedOfShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetComposedOf()); if (composedOfShouldBeCopiedAndSet == Boolean.TRUE) { List<DSDataSetPropertyType> sourceComposedOf; sourceComposedOf = (this.isSetComposedOf()?this.getComposedOf():null); @SuppressWarnings("unchecked") List<DSDataSetPropertyType> copyComposedOf = ((List<DSDataSetPropertyType> ) strategy.copy(LocatorUtils.property(locator, "composedOf", sourceComposedOf), sourceComposedOf, this.isSetComposedOf())); copy.unsetComposedOf(); if (copyComposedOf!= null) { List<DSDataSetPropertyType> uniqueComposedOfl = copy.getComposedOf(); uniqueComposedOfl.addAll(copyComposedOf); } } else { if (composedOfShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetComposedOf(); } } } { Boolean seriesMetadataShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSeriesMetadata()); if (seriesMetadataShouldBeCopiedAndSet == Boolean.TRUE) { List<MDMetadataPropertyType> sourceSeriesMetadata; sourceSeriesMetadata = (this.isSetSeriesMetadata()?this.getSeriesMetadata():null); @SuppressWarnings("unchecked") List<MDMetadataPropertyType> copySeriesMetadata = ((List<MDMetadataPropertyType> ) strategy.copy(LocatorUtils.property(locator, "seriesMetadata", sourceSeriesMetadata), sourceSeriesMetadata, this.isSetSeriesMetadata())); copy.unsetSeriesMetadata(); if (copySeriesMetadata!= null) { List<MDMetadataPropertyType> uniqueSeriesMetadatal = copy.getSeriesMetadata(); uniqueSeriesMetadatal.addAll(copySeriesMetadata); } } else { if (seriesMetadataShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetSeriesMetadata(); } } } { Boolean subsetShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSubset()); if (subsetShouldBeCopiedAndSet == Boolean.TRUE) { List<DSAggregatePropertyType> sourceSubset; sourceSubset = (this.isSetSubset()?this.getSubset():null); @SuppressWarnings("unchecked") List<DSAggregatePropertyType> copySubset = ((List<DSAggregatePropertyType> ) strategy.copy(LocatorUtils.property(locator, "subset", sourceSubset), sourceSubset, this.isSetSubset())); copy.unsetSubset(); if (copySubset!= null) { List<DSAggregatePropertyType> uniqueSubsetl = copy.getSubset(); uniqueSubsetl.addAll(copySubset); } } else { if (subsetShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetSubset(); } } } { Boolean supersetShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSuperset()); if (supersetShouldBeCopiedAndSet == Boolean.TRUE) { List<DSAggregatePropertyType> sourceSuperset; sourceSuperset = (this.isSetSuperset()?this.getSuperset():null); @SuppressWarnings("unchecked") List<DSAggregatePropertyType> copySuperset = ((List<DSAggregatePropertyType> ) strategy.copy(LocatorUtils.property(locator, "superset", sourceSuperset), sourceSuperset, this.isSetSuperset())); copy.unsetSuperset(); if (copySuperset!= null) { List<DSAggregatePropertyType> uniqueSupersetl = copy.getSuperset(); uniqueSupersetl.addAll(copySuperset); } } else { if (supersetShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetSuperset(); } } } } 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) { super.mergeFrom(leftLocator, rightLocator, left, right, strategy); if (right instanceof AbstractDSAggregateType) { final AbstractDSAggregateType target = this; final AbstractDSAggregateType leftObject = ((AbstractDSAggregateType) left); final AbstractDSAggregateType rightObject = ((AbstractDSAggregateType) right); { Boolean composedOfShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetComposedOf(), rightObject.isSetComposedOf()); if (composedOfShouldBeMergedAndSet == Boolean.TRUE) { List<DSDataSetPropertyType> lhsComposedOf; lhsComposedOf = (leftObject.isSetComposedOf()?leftObject.getComposedOf():null); List<DSDataSetPropertyType> rhsComposedOf; rhsComposedOf = (rightObject.isSetComposedOf()?rightObject.getComposedOf():null); List<DSDataSetPropertyType> mergedComposedOf = ((List<DSDataSetPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "composedOf", lhsComposedOf), LocatorUtils.property(rightLocator, "composedOf", rhsComposedOf), lhsComposedOf, rhsComposedOf, leftObject.isSetComposedOf(), rightObject.isSetComposedOf())); target.unsetComposedOf(); if (mergedComposedOf!= null) { List<DSDataSetPropertyType> uniqueComposedOfl = target.getComposedOf(); uniqueComposedOfl.addAll(mergedComposedOf); } } else { if (composedOfShouldBeMergedAndSet == Boolean.FALSE) { target.unsetComposedOf(); } } } { Boolean seriesMetadataShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSeriesMetadata(), rightObject.isSetSeriesMetadata()); if (seriesMetadataShouldBeMergedAndSet == Boolean.TRUE) { List<MDMetadataPropertyType> lhsSeriesMetadata; lhsSeriesMetadata = (leftObject.isSetSeriesMetadata()?leftObject.getSeriesMetadata():null); List<MDMetadataPropertyType> rhsSeriesMetadata; rhsSeriesMetadata = (rightObject.isSetSeriesMetadata()?rightObject.getSeriesMetadata():null); List<MDMetadataPropertyType> mergedSeriesMetadata = ((List<MDMetadataPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "seriesMetadata", lhsSeriesMetadata), LocatorUtils.property(rightLocator, "seriesMetadata", rhsSeriesMetadata), lhsSeriesMetadata, rhsSeriesMetadata, leftObject.isSetSeriesMetadata(), rightObject.isSetSeriesMetadata())); target.unsetSeriesMetadata(); if (mergedSeriesMetadata!= null) { List<MDMetadataPropertyType> uniqueSeriesMetadatal = target.getSeriesMetadata(); uniqueSeriesMetadatal.addAll(mergedSeriesMetadata); } } else { if (seriesMetadataShouldBeMergedAndSet == Boolean.FALSE) { target.unsetSeriesMetadata(); } } } { Boolean subsetShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSubset(), rightObject.isSetSubset()); if (subsetShouldBeMergedAndSet == Boolean.TRUE) { List<DSAggregatePropertyType> lhsSubset; lhsSubset = (leftObject.isSetSubset()?leftObject.getSubset():null); List<DSAggregatePropertyType> rhsSubset; rhsSubset = (rightObject.isSetSubset()?rightObject.getSubset():null); List<DSAggregatePropertyType> mergedSubset = ((List<DSAggregatePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "subset", lhsSubset), LocatorUtils.property(rightLocator, "subset", rhsSubset), lhsSubset, rhsSubset, leftObject.isSetSubset(), rightObject.isSetSubset())); target.unsetSubset(); if (mergedSubset!= null) { List<DSAggregatePropertyType> uniqueSubsetl = target.getSubset(); uniqueSubsetl.addAll(mergedSubset); } } else { if (subsetShouldBeMergedAndSet == Boolean.FALSE) { target.unsetSubset(); } } } { Boolean supersetShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSuperset(), rightObject.isSetSuperset()); if (supersetShouldBeMergedAndSet == Boolean.TRUE) { List<DSAggregatePropertyType> lhsSuperset; lhsSuperset = (leftObject.isSetSuperset()?leftObject.getSuperset():null); List<DSAggregatePropertyType> rhsSuperset; rhsSuperset = (rightObject.isSetSuperset()?rightObject.getSuperset():null); List<DSAggregatePropertyType> mergedSuperset = ((List<DSAggregatePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "superset", lhsSuperset), LocatorUtils.property(rightLocator, "superset", rhsSuperset), lhsSuperset, rhsSuperset, leftObject.isSetSuperset(), rightObject.isSetSuperset())); target.unsetSuperset(); if (mergedSuperset!= null) { List<DSAggregatePropertyType> uniqueSupersetl = target.getSuperset(); uniqueSupersetl.addAll(mergedSuperset); } } else { if (supersetShouldBeMergedAndSet == Boolean.FALSE) { target.unsetSuperset(); } } } } } public void setComposedOf(List<DSDataSetPropertyType> value) { this.composedOf = null; if (value!= null) { List<DSDataSetPropertyType> draftl = this.getComposedOf(); draftl.addAll(value); } } public void setSeriesMetadata(List<MDMetadataPropertyType> value) { this.seriesMetadata = null; if (value!= null) { List<MDMetadataPropertyType> draftl = this.getSeriesMetadata(); draftl.addAll(value); } } public void setSubset(List<DSAggregatePropertyType> value) { this.subset = null; if (value!= null) { List<DSAggregatePropertyType> draftl = this.getSubset(); draftl.addAll(value); } } public void setSuperset(List<DSAggregatePropertyType> value) { this.superset = null; if (value!= null) { List<DSAggregatePropertyType> draftl = this.getSuperset(); draftl.addAll(value); } } }