//
// 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 mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core;
import java.io.Serializable;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
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;
/**
* Simple Rectangle Type: A simple rectangle type as profiled from GML 3.3 (OGC 10-129r1) for use in the TSPI Schema but extended to include both assessments of the accuracy and/or resolution of the coordinate tuples as well as optional specification of one or more character-oriented presentations of the coordinate tuples based on the sexagesimal, grid-metre, zone-metre, quadrangle and/or numeric-bit location forms. A simple rectangle is the special case of a simple polygon, which has exactly 4 control points in its boundary encoding representing the 4 corners of the rectangle.
*
* <p>Java class for SimpleRectangleType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SimpleRectangleType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.3/ce}SimpleRectangleType">
* <sequence>
* <group ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0/core}resolutionGroup"/>
* <group ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0/core}presentationGroup"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SimpleRectangleType", propOrder = {
"horizResolutionCategory",
"vertResolutionCategory",
"horizPresentation",
"vertPresentation"
})
public class SimpleRectangleType
extends net.opengis.gml._3_3.ce.SimpleRectangleType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@Valid
protected HorizontalResolutionType horizResolutionCategory;
@Valid
protected VerticalResolutionType vertResolutionCategory;
@Valid
protected HorizontalPresentationType horizPresentation;
@Valid
protected VerticalPresentationType vertPresentation;
/**
* Gets the value of the horizResolutionCategory property.
*
* @return
* possible object is
* {@link HorizontalResolutionType }
*
*/
public HorizontalResolutionType getHorizResolutionCategory() {
return horizResolutionCategory;
}
/**
* Sets the value of the horizResolutionCategory property.
*
* @param value
* allowed object is
* {@link HorizontalResolutionType }
*
*/
public void setHorizResolutionCategory(HorizontalResolutionType value) {
this.horizResolutionCategory = value;
}
public boolean isSetHorizResolutionCategory() {
return (this.horizResolutionCategory!= null);
}
/**
* Gets the value of the vertResolutionCategory property.
*
* @return
* possible object is
* {@link VerticalResolutionType }
*
*/
public VerticalResolutionType getVertResolutionCategory() {
return vertResolutionCategory;
}
/**
* Sets the value of the vertResolutionCategory property.
*
* @param value
* allowed object is
* {@link VerticalResolutionType }
*
*/
public void setVertResolutionCategory(VerticalResolutionType value) {
this.vertResolutionCategory = value;
}
public boolean isSetVertResolutionCategory() {
return (this.vertResolutionCategory!= null);
}
/**
* Gets the value of the horizPresentation property.
*
* @return
* possible object is
* {@link HorizontalPresentationType }
*
*/
public HorizontalPresentationType getHorizPresentation() {
return horizPresentation;
}
/**
* Sets the value of the horizPresentation property.
*
* @param value
* allowed object is
* {@link HorizontalPresentationType }
*
*/
public void setHorizPresentation(HorizontalPresentationType value) {
this.horizPresentation = value;
}
public boolean isSetHorizPresentation() {
return (this.horizPresentation!= null);
}
/**
* Gets the value of the vertPresentation property.
*
* @return
* possible object is
* {@link VerticalPresentationType }
*
*/
public VerticalPresentationType getVertPresentation() {
return vertPresentation;
}
/**
* Sets the value of the vertPresentation property.
*
* @param value
* allowed object is
* {@link VerticalPresentationType }
*
*/
public void setVertPresentation(VerticalPresentationType value) {
this.vertPresentation = value;
}
public boolean isSetVertPresentation() {
return (this.vertPresentation!= 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);
{
HorizontalResolutionType theHorizResolutionCategory;
theHorizResolutionCategory = this.getHorizResolutionCategory();
strategy.appendField(locator, this, "horizResolutionCategory", buffer, theHorizResolutionCategory, this.isSetHorizResolutionCategory());
}
{
VerticalResolutionType theVertResolutionCategory;
theVertResolutionCategory = this.getVertResolutionCategory();
strategy.appendField(locator, this, "vertResolutionCategory", buffer, theVertResolutionCategory, this.isSetVertResolutionCategory());
}
{
HorizontalPresentationType theHorizPresentation;
theHorizPresentation = this.getHorizPresentation();
strategy.appendField(locator, this, "horizPresentation", buffer, theHorizPresentation, this.isSetHorizPresentation());
}
{
VerticalPresentationType theVertPresentation;
theVertPresentation = this.getVertPresentation();
strategy.appendField(locator, this, "vertPresentation", buffer, theVertPresentation, this.isSetVertPresentation());
}
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 SimpleRectangleType that = ((SimpleRectangleType) object);
{
HorizontalResolutionType lhsHorizResolutionCategory;
lhsHorizResolutionCategory = this.getHorizResolutionCategory();
HorizontalResolutionType rhsHorizResolutionCategory;
rhsHorizResolutionCategory = that.getHorizResolutionCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "horizResolutionCategory", lhsHorizResolutionCategory), LocatorUtils.property(thatLocator, "horizResolutionCategory", rhsHorizResolutionCategory), lhsHorizResolutionCategory, rhsHorizResolutionCategory, this.isSetHorizResolutionCategory(), that.isSetHorizResolutionCategory())) {
return false;
}
}
{
VerticalResolutionType lhsVertResolutionCategory;
lhsVertResolutionCategory = this.getVertResolutionCategory();
VerticalResolutionType rhsVertResolutionCategory;
rhsVertResolutionCategory = that.getVertResolutionCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "vertResolutionCategory", lhsVertResolutionCategory), LocatorUtils.property(thatLocator, "vertResolutionCategory", rhsVertResolutionCategory), lhsVertResolutionCategory, rhsVertResolutionCategory, this.isSetVertResolutionCategory(), that.isSetVertResolutionCategory())) {
return false;
}
}
{
HorizontalPresentationType lhsHorizPresentation;
lhsHorizPresentation = this.getHorizPresentation();
HorizontalPresentationType rhsHorizPresentation;
rhsHorizPresentation = that.getHorizPresentation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "horizPresentation", lhsHorizPresentation), LocatorUtils.property(thatLocator, "horizPresentation", rhsHorizPresentation), lhsHorizPresentation, rhsHorizPresentation, this.isSetHorizPresentation(), that.isSetHorizPresentation())) {
return false;
}
}
{
VerticalPresentationType lhsVertPresentation;
lhsVertPresentation = this.getVertPresentation();
VerticalPresentationType rhsVertPresentation;
rhsVertPresentation = that.getVertPresentation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "vertPresentation", lhsVertPresentation), LocatorUtils.property(thatLocator, "vertPresentation", rhsVertPresentation), lhsVertPresentation, rhsVertPresentation, this.isSetVertPresentation(), that.isSetVertPresentation())) {
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);
{
HorizontalResolutionType theHorizResolutionCategory;
theHorizResolutionCategory = this.getHorizResolutionCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "horizResolutionCategory", theHorizResolutionCategory), currentHashCode, theHorizResolutionCategory, this.isSetHorizResolutionCategory());
}
{
VerticalResolutionType theVertResolutionCategory;
theVertResolutionCategory = this.getVertResolutionCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "vertResolutionCategory", theVertResolutionCategory), currentHashCode, theVertResolutionCategory, this.isSetVertResolutionCategory());
}
{
HorizontalPresentationType theHorizPresentation;
theHorizPresentation = this.getHorizPresentation();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "horizPresentation", theHorizPresentation), currentHashCode, theHorizPresentation, this.isSetHorizPresentation());
}
{
VerticalPresentationType theVertPresentation;
theVertPresentation = this.getVertPresentation();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "vertPresentation", theVertPresentation), currentHashCode, theVertPresentation, this.isSetVertPresentation());
}
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 SimpleRectangleType) {
final SimpleRectangleType copy = ((SimpleRectangleType) draftCopy);
{
Boolean horizResolutionCategoryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetHorizResolutionCategory());
if (horizResolutionCategoryShouldBeCopiedAndSet == Boolean.TRUE) {
HorizontalResolutionType sourceHorizResolutionCategory;
sourceHorizResolutionCategory = this.getHorizResolutionCategory();
HorizontalResolutionType copyHorizResolutionCategory = ((HorizontalResolutionType) strategy.copy(LocatorUtils.property(locator, "horizResolutionCategory", sourceHorizResolutionCategory), sourceHorizResolutionCategory, this.isSetHorizResolutionCategory()));
copy.setHorizResolutionCategory(copyHorizResolutionCategory);
} else {
if (horizResolutionCategoryShouldBeCopiedAndSet == Boolean.FALSE) {
copy.horizResolutionCategory = null;
}
}
}
{
Boolean vertResolutionCategoryShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetVertResolutionCategory());
if (vertResolutionCategoryShouldBeCopiedAndSet == Boolean.TRUE) {
VerticalResolutionType sourceVertResolutionCategory;
sourceVertResolutionCategory = this.getVertResolutionCategory();
VerticalResolutionType copyVertResolutionCategory = ((VerticalResolutionType) strategy.copy(LocatorUtils.property(locator, "vertResolutionCategory", sourceVertResolutionCategory), sourceVertResolutionCategory, this.isSetVertResolutionCategory()));
copy.setVertResolutionCategory(copyVertResolutionCategory);
} else {
if (vertResolutionCategoryShouldBeCopiedAndSet == Boolean.FALSE) {
copy.vertResolutionCategory = null;
}
}
}
{
Boolean horizPresentationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetHorizPresentation());
if (horizPresentationShouldBeCopiedAndSet == Boolean.TRUE) {
HorizontalPresentationType sourceHorizPresentation;
sourceHorizPresentation = this.getHorizPresentation();
HorizontalPresentationType copyHorizPresentation = ((HorizontalPresentationType) strategy.copy(LocatorUtils.property(locator, "horizPresentation", sourceHorizPresentation), sourceHorizPresentation, this.isSetHorizPresentation()));
copy.setHorizPresentation(copyHorizPresentation);
} else {
if (horizPresentationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.horizPresentation = null;
}
}
}
{
Boolean vertPresentationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetVertPresentation());
if (vertPresentationShouldBeCopiedAndSet == Boolean.TRUE) {
VerticalPresentationType sourceVertPresentation;
sourceVertPresentation = this.getVertPresentation();
VerticalPresentationType copyVertPresentation = ((VerticalPresentationType) strategy.copy(LocatorUtils.property(locator, "vertPresentation", sourceVertPresentation), sourceVertPresentation, this.isSetVertPresentation()));
copy.setVertPresentation(copyVertPresentation);
} else {
if (vertPresentationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.vertPresentation = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new SimpleRectangleType();
}
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 SimpleRectangleType) {
final SimpleRectangleType target = this;
final SimpleRectangleType leftObject = ((SimpleRectangleType) left);
final SimpleRectangleType rightObject = ((SimpleRectangleType) right);
{
Boolean horizResolutionCategoryShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetHorizResolutionCategory(), rightObject.isSetHorizResolutionCategory());
if (horizResolutionCategoryShouldBeMergedAndSet == Boolean.TRUE) {
HorizontalResolutionType lhsHorizResolutionCategory;
lhsHorizResolutionCategory = leftObject.getHorizResolutionCategory();
HorizontalResolutionType rhsHorizResolutionCategory;
rhsHorizResolutionCategory = rightObject.getHorizResolutionCategory();
HorizontalResolutionType mergedHorizResolutionCategory = ((HorizontalResolutionType) strategy.merge(LocatorUtils.property(leftLocator, "horizResolutionCategory", lhsHorizResolutionCategory), LocatorUtils.property(rightLocator, "horizResolutionCategory", rhsHorizResolutionCategory), lhsHorizResolutionCategory, rhsHorizResolutionCategory, leftObject.isSetHorizResolutionCategory(), rightObject.isSetHorizResolutionCategory()));
target.setHorizResolutionCategory(mergedHorizResolutionCategory);
} else {
if (horizResolutionCategoryShouldBeMergedAndSet == Boolean.FALSE) {
target.horizResolutionCategory = null;
}
}
}
{
Boolean vertResolutionCategoryShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetVertResolutionCategory(), rightObject.isSetVertResolutionCategory());
if (vertResolutionCategoryShouldBeMergedAndSet == Boolean.TRUE) {
VerticalResolutionType lhsVertResolutionCategory;
lhsVertResolutionCategory = leftObject.getVertResolutionCategory();
VerticalResolutionType rhsVertResolutionCategory;
rhsVertResolutionCategory = rightObject.getVertResolutionCategory();
VerticalResolutionType mergedVertResolutionCategory = ((VerticalResolutionType) strategy.merge(LocatorUtils.property(leftLocator, "vertResolutionCategory", lhsVertResolutionCategory), LocatorUtils.property(rightLocator, "vertResolutionCategory", rhsVertResolutionCategory), lhsVertResolutionCategory, rhsVertResolutionCategory, leftObject.isSetVertResolutionCategory(), rightObject.isSetVertResolutionCategory()));
target.setVertResolutionCategory(mergedVertResolutionCategory);
} else {
if (vertResolutionCategoryShouldBeMergedAndSet == Boolean.FALSE) {
target.vertResolutionCategory = null;
}
}
}
{
Boolean horizPresentationShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetHorizPresentation(), rightObject.isSetHorizPresentation());
if (horizPresentationShouldBeMergedAndSet == Boolean.TRUE) {
HorizontalPresentationType lhsHorizPresentation;
lhsHorizPresentation = leftObject.getHorizPresentation();
HorizontalPresentationType rhsHorizPresentation;
rhsHorizPresentation = rightObject.getHorizPresentation();
HorizontalPresentationType mergedHorizPresentation = ((HorizontalPresentationType) strategy.merge(LocatorUtils.property(leftLocator, "horizPresentation", lhsHorizPresentation), LocatorUtils.property(rightLocator, "horizPresentation", rhsHorizPresentation), lhsHorizPresentation, rhsHorizPresentation, leftObject.isSetHorizPresentation(), rightObject.isSetHorizPresentation()));
target.setHorizPresentation(mergedHorizPresentation);
} else {
if (horizPresentationShouldBeMergedAndSet == Boolean.FALSE) {
target.horizPresentation = null;
}
}
}
{
Boolean vertPresentationShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetVertPresentation(), rightObject.isSetVertPresentation());
if (vertPresentationShouldBeMergedAndSet == Boolean.TRUE) {
VerticalPresentationType lhsVertPresentation;
lhsVertPresentation = leftObject.getVertPresentation();
VerticalPresentationType rhsVertPresentation;
rhsVertPresentation = rightObject.getVertPresentation();
VerticalPresentationType mergedVertPresentation = ((VerticalPresentationType) strategy.merge(LocatorUtils.property(leftLocator, "vertPresentation", lhsVertPresentation), LocatorUtils.property(rightLocator, "vertPresentation", rhsVertPresentation), lhsVertPresentation, rhsVertPresentation, leftObject.isSetVertPresentation(), rightObject.isSetVertPresentation()));
target.setVertPresentation(mergedVertPresentation);
} else {
if (vertPresentationShouldBeMergedAndSet == Boolean.FALSE) {
target.vertPresentation = null;
}
}
}
}
}
}