// // 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 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.XmlType; import org.isotc211._2005.gco.AbstractObjectType; import org.isotc211._2005.gco.IntegerPropertyType; import org.isotc211._2005.gco.MeasurePropertyType; 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 MD_Dimension_Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="MD_Dimension_Type"> * <complexContent> * <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type"> * <sequence> * <element name="dimensionName" type="{http://www.isotc211.org/2005/gmd}MD_DimensionNameTypeCode_PropertyType"/> * <element name="dimensionSize" type="{http://www.isotc211.org/2005/gco}Integer_PropertyType"/> * <element name="resolution" type="{http://www.isotc211.org/2005/gco}Measure_PropertyType" minOccurs="0"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MD_Dimension_Type", propOrder = { "dimensionName", "dimensionSize", "resolution" }) public class MDDimensionType extends AbstractObjectType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(required = true) @NotNull(message = "MDDimensionType.dimensionName {javax.validation.constraints.NotNull.message}") @Valid protected MDDimensionNameTypeCodePropertyType dimensionName; @XmlElement(required = true) @NotNull(message = "MDDimensionType.dimensionSize {javax.validation.constraints.NotNull.message}") @Valid protected IntegerPropertyType dimensionSize; @Valid protected MeasurePropertyType resolution; /** * Gets the value of the dimensionName property. * * @return * possible object is * {@link MDDimensionNameTypeCodePropertyType } * */ public MDDimensionNameTypeCodePropertyType getDimensionName() { return dimensionName; } /** * Sets the value of the dimensionName property. * * @param value * allowed object is * {@link MDDimensionNameTypeCodePropertyType } * */ public void setDimensionName(MDDimensionNameTypeCodePropertyType value) { this.dimensionName = value; } public boolean isSetDimensionName() { return (this.dimensionName!= null); } /** * Gets the value of the dimensionSize property. * * @return * possible object is * {@link IntegerPropertyType } * */ public IntegerPropertyType getDimensionSize() { return dimensionSize; } /** * Sets the value of the dimensionSize property. * * @param value * allowed object is * {@link IntegerPropertyType } * */ public void setDimensionSize(IntegerPropertyType value) { this.dimensionSize = value; } public boolean isSetDimensionSize() { return (this.dimensionSize!= null); } /** * Gets the value of the resolution property. * * @return * possible object is * {@link MeasurePropertyType } * */ public MeasurePropertyType getResolution() { return resolution; } /** * Sets the value of the resolution property. * * @param value * allowed object is * {@link MeasurePropertyType } * */ public void setResolution(MeasurePropertyType value) { this.resolution = value; } public boolean isSetResolution() { return (this.resolution!= 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); { MDDimensionNameTypeCodePropertyType theDimensionName; theDimensionName = this.getDimensionName(); strategy.appendField(locator, this, "dimensionName", buffer, theDimensionName, this.isSetDimensionName()); } { IntegerPropertyType theDimensionSize; theDimensionSize = this.getDimensionSize(); strategy.appendField(locator, this, "dimensionSize", buffer, theDimensionSize, this.isSetDimensionSize()); } { MeasurePropertyType theResolution; theResolution = this.getResolution(); strategy.appendField(locator, this, "resolution", buffer, theResolution, this.isSetResolution()); } 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 MDDimensionType that = ((MDDimensionType) object); { MDDimensionNameTypeCodePropertyType lhsDimensionName; lhsDimensionName = this.getDimensionName(); MDDimensionNameTypeCodePropertyType rhsDimensionName; rhsDimensionName = that.getDimensionName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "dimensionName", lhsDimensionName), LocatorUtils.property(thatLocator, "dimensionName", rhsDimensionName), lhsDimensionName, rhsDimensionName, this.isSetDimensionName(), that.isSetDimensionName())) { return false; } } { IntegerPropertyType lhsDimensionSize; lhsDimensionSize = this.getDimensionSize(); IntegerPropertyType rhsDimensionSize; rhsDimensionSize = that.getDimensionSize(); if (!strategy.equals(LocatorUtils.property(thisLocator, "dimensionSize", lhsDimensionSize), LocatorUtils.property(thatLocator, "dimensionSize", rhsDimensionSize), lhsDimensionSize, rhsDimensionSize, this.isSetDimensionSize(), that.isSetDimensionSize())) { return false; } } { MeasurePropertyType lhsResolution; lhsResolution = this.getResolution(); MeasurePropertyType rhsResolution; rhsResolution = that.getResolution(); if (!strategy.equals(LocatorUtils.property(thisLocator, "resolution", lhsResolution), LocatorUtils.property(thatLocator, "resolution", rhsResolution), lhsResolution, rhsResolution, this.isSetResolution(), that.isSetResolution())) { 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); { MDDimensionNameTypeCodePropertyType theDimensionName; theDimensionName = this.getDimensionName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dimensionName", theDimensionName), currentHashCode, theDimensionName, this.isSetDimensionName()); } { IntegerPropertyType theDimensionSize; theDimensionSize = this.getDimensionSize(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dimensionSize", theDimensionSize), currentHashCode, theDimensionSize, this.isSetDimensionSize()); } { MeasurePropertyType theResolution; theResolution = this.getResolution(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "resolution", theResolution), currentHashCode, theResolution, this.isSetResolution()); } 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 MDDimensionType) { final MDDimensionType copy = ((MDDimensionType) draftCopy); { Boolean dimensionNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDimensionName()); if (dimensionNameShouldBeCopiedAndSet == Boolean.TRUE) { MDDimensionNameTypeCodePropertyType sourceDimensionName; sourceDimensionName = this.getDimensionName(); MDDimensionNameTypeCodePropertyType copyDimensionName = ((MDDimensionNameTypeCodePropertyType) strategy.copy(LocatorUtils.property(locator, "dimensionName", sourceDimensionName), sourceDimensionName, this.isSetDimensionName())); copy.setDimensionName(copyDimensionName); } else { if (dimensionNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.dimensionName = null; } } } { Boolean dimensionSizeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDimensionSize()); if (dimensionSizeShouldBeCopiedAndSet == Boolean.TRUE) { IntegerPropertyType sourceDimensionSize; sourceDimensionSize = this.getDimensionSize(); IntegerPropertyType copyDimensionSize = ((IntegerPropertyType) strategy.copy(LocatorUtils.property(locator, "dimensionSize", sourceDimensionSize), sourceDimensionSize, this.isSetDimensionSize())); copy.setDimensionSize(copyDimensionSize); } else { if (dimensionSizeShouldBeCopiedAndSet == Boolean.FALSE) { copy.dimensionSize = null; } } } { Boolean resolutionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetResolution()); if (resolutionShouldBeCopiedAndSet == Boolean.TRUE) { MeasurePropertyType sourceResolution; sourceResolution = this.getResolution(); MeasurePropertyType copyResolution = ((MeasurePropertyType) strategy.copy(LocatorUtils.property(locator, "resolution", sourceResolution), sourceResolution, this.isSetResolution())); copy.setResolution(copyResolution); } else { if (resolutionShouldBeCopiedAndSet == Boolean.FALSE) { copy.resolution = null; } } } } return draftCopy; } public Object createNewInstance() { return new MDDimensionType(); } 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 MDDimensionType) { final MDDimensionType target = this; final MDDimensionType leftObject = ((MDDimensionType) left); final MDDimensionType rightObject = ((MDDimensionType) right); { Boolean dimensionNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDimensionName(), rightObject.isSetDimensionName()); if (dimensionNameShouldBeMergedAndSet == Boolean.TRUE) { MDDimensionNameTypeCodePropertyType lhsDimensionName; lhsDimensionName = leftObject.getDimensionName(); MDDimensionNameTypeCodePropertyType rhsDimensionName; rhsDimensionName = rightObject.getDimensionName(); MDDimensionNameTypeCodePropertyType mergedDimensionName = ((MDDimensionNameTypeCodePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "dimensionName", lhsDimensionName), LocatorUtils.property(rightLocator, "dimensionName", rhsDimensionName), lhsDimensionName, rhsDimensionName, leftObject.isSetDimensionName(), rightObject.isSetDimensionName())); target.setDimensionName(mergedDimensionName); } else { if (dimensionNameShouldBeMergedAndSet == Boolean.FALSE) { target.dimensionName = null; } } } { Boolean dimensionSizeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDimensionSize(), rightObject.isSetDimensionSize()); if (dimensionSizeShouldBeMergedAndSet == Boolean.TRUE) { IntegerPropertyType lhsDimensionSize; lhsDimensionSize = leftObject.getDimensionSize(); IntegerPropertyType rhsDimensionSize; rhsDimensionSize = rightObject.getDimensionSize(); IntegerPropertyType mergedDimensionSize = ((IntegerPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "dimensionSize", lhsDimensionSize), LocatorUtils.property(rightLocator, "dimensionSize", rhsDimensionSize), lhsDimensionSize, rhsDimensionSize, leftObject.isSetDimensionSize(), rightObject.isSetDimensionSize())); target.setDimensionSize(mergedDimensionSize); } else { if (dimensionSizeShouldBeMergedAndSet == Boolean.FALSE) { target.dimensionSize = null; } } } { Boolean resolutionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetResolution(), rightObject.isSetResolution()); if (resolutionShouldBeMergedAndSet == Boolean.TRUE) { MeasurePropertyType lhsResolution; lhsResolution = leftObject.getResolution(); MeasurePropertyType rhsResolution; rhsResolution = rightObject.getResolution(); MeasurePropertyType mergedResolution = ((MeasurePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "resolution", lhsResolution), LocatorUtils.property(rightLocator, "resolution", rhsResolution), lhsResolution, rhsResolution, leftObject.isSetResolution(), rightObject.isSetResolution())); target.setResolution(mergedResolution); } else { if (resolutionShouldBeMergedAndSet == Boolean.FALSE) { target.resolution = null; } } } } } }