// // 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.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.BooleanPropertyType; import org.isotc211._2005.gco.IntegerPropertyType; 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; /** * Types and numbers of raster spatial objects in the dataset * * <p>Java class for MD_GridSpatialRepresentation_Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="MD_GridSpatialRepresentation_Type"> * <complexContent> * <extension base="{http://www.isotc211.org/2005/gmd}AbstractMD_SpatialRepresentation_Type"> * <sequence> * <element name="numberOfDimensions" type="{http://www.isotc211.org/2005/gco}Integer_PropertyType"/> * <element name="axisDimensionProperties" type="{http://www.isotc211.org/2005/gmd}MD_Dimension_PropertyType" maxOccurs="unbounded" minOccurs="0"/> * <element name="cellGeometry" type="{http://www.isotc211.org/2005/gmd}MD_CellGeometryCode_PropertyType"/> * <element name="transformationParameterAvailability" type="{http://www.isotc211.org/2005/gco}Boolean_PropertyType"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MD_GridSpatialRepresentation_Type", propOrder = { "numberOfDimensions", "axisDimensionProperties", "cellGeometry", "transformationParameterAvailability" }) @XmlSeeAlso({ MDGeoreferenceableType.class, MDGeorectifiedType.class }) public class MDGridSpatialRepresentationType extends AbstractMDSpatialRepresentationType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(required = true) @NotNull(message = "MDGridSpatialRepresentationType.numberOfDimensions {javax.validation.constraints.NotNull.message}") @Valid protected IntegerPropertyType numberOfDimensions; @Valid protected List<MDDimensionPropertyType> axisDimensionProperties; @XmlElement(required = true) @NotNull(message = "MDGridSpatialRepresentationType.cellGeometry {javax.validation.constraints.NotNull.message}") @Valid protected MDCellGeometryCodePropertyType cellGeometry; @XmlElement(required = true) @NotNull(message = "MDGridSpatialRepresentationType.transformationParameterAvailability {javax.validation.constraints.NotNull.message}") @Valid protected BooleanPropertyType transformationParameterAvailability; /** * Gets the value of the numberOfDimensions property. * * @return * possible object is * {@link IntegerPropertyType } * */ public IntegerPropertyType getNumberOfDimensions() { return numberOfDimensions; } /** * Sets the value of the numberOfDimensions property. * * @param value * allowed object is * {@link IntegerPropertyType } * */ public void setNumberOfDimensions(IntegerPropertyType value) { this.numberOfDimensions = value; } public boolean isSetNumberOfDimensions() { return (this.numberOfDimensions!= null); } /** * Gets the value of the axisDimensionProperties 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 axisDimensionProperties property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAxisDimensionProperties().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link MDDimensionPropertyType } * * */ public List<MDDimensionPropertyType> getAxisDimensionProperties() { if (axisDimensionProperties == null) { axisDimensionProperties = new ArrayList<MDDimensionPropertyType>(); } return this.axisDimensionProperties; } public boolean isSetAxisDimensionProperties() { return ((this.axisDimensionProperties!= null)&&(!this.axisDimensionProperties.isEmpty())); } public void unsetAxisDimensionProperties() { this.axisDimensionProperties = null; } /** * Gets the value of the cellGeometry property. * * @return * possible object is * {@link MDCellGeometryCodePropertyType } * */ public MDCellGeometryCodePropertyType getCellGeometry() { return cellGeometry; } /** * Sets the value of the cellGeometry property. * * @param value * allowed object is * {@link MDCellGeometryCodePropertyType } * */ public void setCellGeometry(MDCellGeometryCodePropertyType value) { this.cellGeometry = value; } public boolean isSetCellGeometry() { return (this.cellGeometry!= null); } /** * Gets the value of the transformationParameterAvailability property. * * @return * possible object is * {@link BooleanPropertyType } * */ public BooleanPropertyType getTransformationParameterAvailability() { return transformationParameterAvailability; } /** * Sets the value of the transformationParameterAvailability property. * * @param value * allowed object is * {@link BooleanPropertyType } * */ public void setTransformationParameterAvailability(BooleanPropertyType value) { this.transformationParameterAvailability = value; } public boolean isSetTransformationParameterAvailability() { return (this.transformationParameterAvailability!= 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); { IntegerPropertyType theNumberOfDimensions; theNumberOfDimensions = this.getNumberOfDimensions(); strategy.appendField(locator, this, "numberOfDimensions", buffer, theNumberOfDimensions, this.isSetNumberOfDimensions()); } { List<MDDimensionPropertyType> theAxisDimensionProperties; theAxisDimensionProperties = (this.isSetAxisDimensionProperties()?this.getAxisDimensionProperties():null); strategy.appendField(locator, this, "axisDimensionProperties", buffer, theAxisDimensionProperties, this.isSetAxisDimensionProperties()); } { MDCellGeometryCodePropertyType theCellGeometry; theCellGeometry = this.getCellGeometry(); strategy.appendField(locator, this, "cellGeometry", buffer, theCellGeometry, this.isSetCellGeometry()); } { BooleanPropertyType theTransformationParameterAvailability; theTransformationParameterAvailability = this.getTransformationParameterAvailability(); strategy.appendField(locator, this, "transformationParameterAvailability", buffer, theTransformationParameterAvailability, this.isSetTransformationParameterAvailability()); } 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 MDGridSpatialRepresentationType that = ((MDGridSpatialRepresentationType) object); { IntegerPropertyType lhsNumberOfDimensions; lhsNumberOfDimensions = this.getNumberOfDimensions(); IntegerPropertyType rhsNumberOfDimensions; rhsNumberOfDimensions = that.getNumberOfDimensions(); if (!strategy.equals(LocatorUtils.property(thisLocator, "numberOfDimensions", lhsNumberOfDimensions), LocatorUtils.property(thatLocator, "numberOfDimensions", rhsNumberOfDimensions), lhsNumberOfDimensions, rhsNumberOfDimensions, this.isSetNumberOfDimensions(), that.isSetNumberOfDimensions())) { return false; } } { List<MDDimensionPropertyType> lhsAxisDimensionProperties; lhsAxisDimensionProperties = (this.isSetAxisDimensionProperties()?this.getAxisDimensionProperties():null); List<MDDimensionPropertyType> rhsAxisDimensionProperties; rhsAxisDimensionProperties = (that.isSetAxisDimensionProperties()?that.getAxisDimensionProperties():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "axisDimensionProperties", lhsAxisDimensionProperties), LocatorUtils.property(thatLocator, "axisDimensionProperties", rhsAxisDimensionProperties), lhsAxisDimensionProperties, rhsAxisDimensionProperties, this.isSetAxisDimensionProperties(), that.isSetAxisDimensionProperties())) { return false; } } { MDCellGeometryCodePropertyType lhsCellGeometry; lhsCellGeometry = this.getCellGeometry(); MDCellGeometryCodePropertyType rhsCellGeometry; rhsCellGeometry = that.getCellGeometry(); if (!strategy.equals(LocatorUtils.property(thisLocator, "cellGeometry", lhsCellGeometry), LocatorUtils.property(thatLocator, "cellGeometry", rhsCellGeometry), lhsCellGeometry, rhsCellGeometry, this.isSetCellGeometry(), that.isSetCellGeometry())) { return false; } } { BooleanPropertyType lhsTransformationParameterAvailability; lhsTransformationParameterAvailability = this.getTransformationParameterAvailability(); BooleanPropertyType rhsTransformationParameterAvailability; rhsTransformationParameterAvailability = that.getTransformationParameterAvailability(); if (!strategy.equals(LocatorUtils.property(thisLocator, "transformationParameterAvailability", lhsTransformationParameterAvailability), LocatorUtils.property(thatLocator, "transformationParameterAvailability", rhsTransformationParameterAvailability), lhsTransformationParameterAvailability, rhsTransformationParameterAvailability, this.isSetTransformationParameterAvailability(), that.isSetTransformationParameterAvailability())) { 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); { IntegerPropertyType theNumberOfDimensions; theNumberOfDimensions = this.getNumberOfDimensions(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "numberOfDimensions", theNumberOfDimensions), currentHashCode, theNumberOfDimensions, this.isSetNumberOfDimensions()); } { List<MDDimensionPropertyType> theAxisDimensionProperties; theAxisDimensionProperties = (this.isSetAxisDimensionProperties()?this.getAxisDimensionProperties():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "axisDimensionProperties", theAxisDimensionProperties), currentHashCode, theAxisDimensionProperties, this.isSetAxisDimensionProperties()); } { MDCellGeometryCodePropertyType theCellGeometry; theCellGeometry = this.getCellGeometry(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "cellGeometry", theCellGeometry), currentHashCode, theCellGeometry, this.isSetCellGeometry()); } { BooleanPropertyType theTransformationParameterAvailability; theTransformationParameterAvailability = this.getTransformationParameterAvailability(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "transformationParameterAvailability", theTransformationParameterAvailability), currentHashCode, theTransformationParameterAvailability, this.isSetTransformationParameterAvailability()); } 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 MDGridSpatialRepresentationType) { final MDGridSpatialRepresentationType copy = ((MDGridSpatialRepresentationType) draftCopy); { Boolean numberOfDimensionsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetNumberOfDimensions()); if (numberOfDimensionsShouldBeCopiedAndSet == Boolean.TRUE) { IntegerPropertyType sourceNumberOfDimensions; sourceNumberOfDimensions = this.getNumberOfDimensions(); IntegerPropertyType copyNumberOfDimensions = ((IntegerPropertyType) strategy.copy(LocatorUtils.property(locator, "numberOfDimensions", sourceNumberOfDimensions), sourceNumberOfDimensions, this.isSetNumberOfDimensions())); copy.setNumberOfDimensions(copyNumberOfDimensions); } else { if (numberOfDimensionsShouldBeCopiedAndSet == Boolean.FALSE) { copy.numberOfDimensions = null; } } } { Boolean axisDimensionPropertiesShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetAxisDimensionProperties()); if (axisDimensionPropertiesShouldBeCopiedAndSet == Boolean.TRUE) { List<MDDimensionPropertyType> sourceAxisDimensionProperties; sourceAxisDimensionProperties = (this.isSetAxisDimensionProperties()?this.getAxisDimensionProperties():null); @SuppressWarnings("unchecked") List<MDDimensionPropertyType> copyAxisDimensionProperties = ((List<MDDimensionPropertyType> ) strategy.copy(LocatorUtils.property(locator, "axisDimensionProperties", sourceAxisDimensionProperties), sourceAxisDimensionProperties, this.isSetAxisDimensionProperties())); copy.unsetAxisDimensionProperties(); if (copyAxisDimensionProperties!= null) { List<MDDimensionPropertyType> uniqueAxisDimensionPropertiesl = copy.getAxisDimensionProperties(); uniqueAxisDimensionPropertiesl.addAll(copyAxisDimensionProperties); } } else { if (axisDimensionPropertiesShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetAxisDimensionProperties(); } } } { Boolean cellGeometryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetCellGeometry()); if (cellGeometryShouldBeCopiedAndSet == Boolean.TRUE) { MDCellGeometryCodePropertyType sourceCellGeometry; sourceCellGeometry = this.getCellGeometry(); MDCellGeometryCodePropertyType copyCellGeometry = ((MDCellGeometryCodePropertyType) strategy.copy(LocatorUtils.property(locator, "cellGeometry", sourceCellGeometry), sourceCellGeometry, this.isSetCellGeometry())); copy.setCellGeometry(copyCellGeometry); } else { if (cellGeometryShouldBeCopiedAndSet == Boolean.FALSE) { copy.cellGeometry = null; } } } { Boolean transformationParameterAvailabilityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTransformationParameterAvailability()); if (transformationParameterAvailabilityShouldBeCopiedAndSet == Boolean.TRUE) { BooleanPropertyType sourceTransformationParameterAvailability; sourceTransformationParameterAvailability = this.getTransformationParameterAvailability(); BooleanPropertyType copyTransformationParameterAvailability = ((BooleanPropertyType) strategy.copy(LocatorUtils.property(locator, "transformationParameterAvailability", sourceTransformationParameterAvailability), sourceTransformationParameterAvailability, this.isSetTransformationParameterAvailability())); copy.setTransformationParameterAvailability(copyTransformationParameterAvailability); } else { if (transformationParameterAvailabilityShouldBeCopiedAndSet == Boolean.FALSE) { copy.transformationParameterAvailability = null; } } } } return draftCopy; } public Object createNewInstance() { return new MDGridSpatialRepresentationType(); } 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 MDGridSpatialRepresentationType) { final MDGridSpatialRepresentationType target = this; final MDGridSpatialRepresentationType leftObject = ((MDGridSpatialRepresentationType) left); final MDGridSpatialRepresentationType rightObject = ((MDGridSpatialRepresentationType) right); { Boolean numberOfDimensionsShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetNumberOfDimensions(), rightObject.isSetNumberOfDimensions()); if (numberOfDimensionsShouldBeMergedAndSet == Boolean.TRUE) { IntegerPropertyType lhsNumberOfDimensions; lhsNumberOfDimensions = leftObject.getNumberOfDimensions(); IntegerPropertyType rhsNumberOfDimensions; rhsNumberOfDimensions = rightObject.getNumberOfDimensions(); IntegerPropertyType mergedNumberOfDimensions = ((IntegerPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "numberOfDimensions", lhsNumberOfDimensions), LocatorUtils.property(rightLocator, "numberOfDimensions", rhsNumberOfDimensions), lhsNumberOfDimensions, rhsNumberOfDimensions, leftObject.isSetNumberOfDimensions(), rightObject.isSetNumberOfDimensions())); target.setNumberOfDimensions(mergedNumberOfDimensions); } else { if (numberOfDimensionsShouldBeMergedAndSet == Boolean.FALSE) { target.numberOfDimensions = null; } } } { Boolean axisDimensionPropertiesShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetAxisDimensionProperties(), rightObject.isSetAxisDimensionProperties()); if (axisDimensionPropertiesShouldBeMergedAndSet == Boolean.TRUE) { List<MDDimensionPropertyType> lhsAxisDimensionProperties; lhsAxisDimensionProperties = (leftObject.isSetAxisDimensionProperties()?leftObject.getAxisDimensionProperties():null); List<MDDimensionPropertyType> rhsAxisDimensionProperties; rhsAxisDimensionProperties = (rightObject.isSetAxisDimensionProperties()?rightObject.getAxisDimensionProperties():null); List<MDDimensionPropertyType> mergedAxisDimensionProperties = ((List<MDDimensionPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator, "axisDimensionProperties", lhsAxisDimensionProperties), LocatorUtils.property(rightLocator, "axisDimensionProperties", rhsAxisDimensionProperties), lhsAxisDimensionProperties, rhsAxisDimensionProperties, leftObject.isSetAxisDimensionProperties(), rightObject.isSetAxisDimensionProperties())); target.unsetAxisDimensionProperties(); if (mergedAxisDimensionProperties!= null) { List<MDDimensionPropertyType> uniqueAxisDimensionPropertiesl = target.getAxisDimensionProperties(); uniqueAxisDimensionPropertiesl.addAll(mergedAxisDimensionProperties); } } else { if (axisDimensionPropertiesShouldBeMergedAndSet == Boolean.FALSE) { target.unsetAxisDimensionProperties(); } } } { Boolean cellGeometryShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetCellGeometry(), rightObject.isSetCellGeometry()); if (cellGeometryShouldBeMergedAndSet == Boolean.TRUE) { MDCellGeometryCodePropertyType lhsCellGeometry; lhsCellGeometry = leftObject.getCellGeometry(); MDCellGeometryCodePropertyType rhsCellGeometry; rhsCellGeometry = rightObject.getCellGeometry(); MDCellGeometryCodePropertyType mergedCellGeometry = ((MDCellGeometryCodePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "cellGeometry", lhsCellGeometry), LocatorUtils.property(rightLocator, "cellGeometry", rhsCellGeometry), lhsCellGeometry, rhsCellGeometry, leftObject.isSetCellGeometry(), rightObject.isSetCellGeometry())); target.setCellGeometry(mergedCellGeometry); } else { if (cellGeometryShouldBeMergedAndSet == Boolean.FALSE) { target.cellGeometry = null; } } } { Boolean transformationParameterAvailabilityShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTransformationParameterAvailability(), rightObject.isSetTransformationParameterAvailability()); if (transformationParameterAvailabilityShouldBeMergedAndSet == Boolean.TRUE) { BooleanPropertyType lhsTransformationParameterAvailability; lhsTransformationParameterAvailability = leftObject.getTransformationParameterAvailability(); BooleanPropertyType rhsTransformationParameterAvailability; rhsTransformationParameterAvailability = rightObject.getTransformationParameterAvailability(); BooleanPropertyType mergedTransformationParameterAvailability = ((BooleanPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "transformationParameterAvailability", lhsTransformationParameterAvailability), LocatorUtils.property(rightLocator, "transformationParameterAvailability", rhsTransformationParameterAvailability), lhsTransformationParameterAvailability, rhsTransformationParameterAvailability, leftObject.isSetTransformationParameterAvailability(), rightObject.isSetTransformationParameterAvailability())); target.setTransformationParameterAvailability(mergedTransformationParameterAvailability); } else { if (transformationParameterAvailabilityShouldBeMergedAndSet == Boolean.FALSE) { target.transformationParameterAvailability = null; } } } } } public void setAxisDimensionProperties(List<MDDimensionPropertyType> value) { this.axisDimensionProperties = null; if (value!= null) { List<MDDimensionPropertyType> draftl = this.getAxisDimensionProperties(); draftl.addAll(value); } } }