// // 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 us.mil.ces.metadata.ddms._5; import java.io.Serializable; import java.util.ArrayList; import java.util.List; 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.XmlElements; import javax.xml.bind.annotation.XmlType; import mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core.CircleType; import mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core.EllipseType; import mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core.EnvelopeType; import mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core.PointType; import mil.ces.metadata.mdr.ns.gsip.tspi._2_0.core.PolygonType; 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 BoundingGeometryType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="BoundingGeometryType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <choice maxOccurs="unbounded"> * <element ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0}Polygon"/> * <element ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0}Point"/> * <element ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0}Envelope"/> * <element ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0}Circle"/> * <element ref="{http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0}Ellipse"/> * </choice> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BoundingGeometryType", propOrder = { "polygonOrPointOrEnvelope" }) public class BoundingGeometryType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElements({ @XmlElement(name = "Polygon", namespace = "http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0", type = PolygonType.class), @XmlElement(name = "Point", namespace = "http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0", type = PointType.class), @XmlElement(name = "Envelope", namespace = "http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0", type = EnvelopeType.class), @XmlElement(name = "Circle", namespace = "http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0", type = CircleType.class), @XmlElement(name = "Ellipse", namespace = "http://metadata.ces.mil/mdr/ns/GSIP/tspi/2.0", type = EllipseType.class) }) @Size(min = 1) protected List<Serializable> polygonOrPointOrEnvelope; /** * Gets the value of the polygonOrPointOrEnvelope 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 polygonOrPointOrEnvelope property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPolygonOrPointOrEnvelope().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link PolygonType } * {@link PointType } * {@link EnvelopeType } * {@link CircleType } * {@link EllipseType } * * */ public List<Serializable> getPolygonOrPointOrEnvelope() { if (polygonOrPointOrEnvelope == null) { polygonOrPointOrEnvelope = new ArrayList<Serializable>(); } return this.polygonOrPointOrEnvelope; } public boolean isSetPolygonOrPointOrEnvelope() { return ((this.polygonOrPointOrEnvelope!= null)&&(!this.polygonOrPointOrEnvelope.isEmpty())); } public void unsetPolygonOrPointOrEnvelope() { this.polygonOrPointOrEnvelope = 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) { { List<Serializable> thePolygonOrPointOrEnvelope; thePolygonOrPointOrEnvelope = (this.isSetPolygonOrPointOrEnvelope()?this.getPolygonOrPointOrEnvelope():null); strategy.appendField(locator, this, "polygonOrPointOrEnvelope", buffer, thePolygonOrPointOrEnvelope, this.isSetPolygonOrPointOrEnvelope()); } 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; } final BoundingGeometryType that = ((BoundingGeometryType) object); { List<Serializable> lhsPolygonOrPointOrEnvelope; lhsPolygonOrPointOrEnvelope = (this.isSetPolygonOrPointOrEnvelope()?this.getPolygonOrPointOrEnvelope():null); List<Serializable> rhsPolygonOrPointOrEnvelope; rhsPolygonOrPointOrEnvelope = (that.isSetPolygonOrPointOrEnvelope()?that.getPolygonOrPointOrEnvelope():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "polygonOrPointOrEnvelope", lhsPolygonOrPointOrEnvelope), LocatorUtils.property(thatLocator, "polygonOrPointOrEnvelope", rhsPolygonOrPointOrEnvelope), lhsPolygonOrPointOrEnvelope, rhsPolygonOrPointOrEnvelope, this.isSetPolygonOrPointOrEnvelope(), that.isSetPolygonOrPointOrEnvelope())) { 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 = 1; { List<Serializable> thePolygonOrPointOrEnvelope; thePolygonOrPointOrEnvelope = (this.isSetPolygonOrPointOrEnvelope()?this.getPolygonOrPointOrEnvelope():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "polygonOrPointOrEnvelope", thePolygonOrPointOrEnvelope), currentHashCode, thePolygonOrPointOrEnvelope, this.isSetPolygonOrPointOrEnvelope()); } 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); if (draftCopy instanceof BoundingGeometryType) { final BoundingGeometryType copy = ((BoundingGeometryType) draftCopy); { Boolean polygonOrPointOrEnvelopeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetPolygonOrPointOrEnvelope()); if (polygonOrPointOrEnvelopeShouldBeCopiedAndSet == Boolean.TRUE) { List<Serializable> sourcePolygonOrPointOrEnvelope; sourcePolygonOrPointOrEnvelope = (this.isSetPolygonOrPointOrEnvelope()?this.getPolygonOrPointOrEnvelope():null); @SuppressWarnings("unchecked") List<Serializable> copyPolygonOrPointOrEnvelope = ((List<Serializable> ) strategy.copy(LocatorUtils.property(locator, "polygonOrPointOrEnvelope", sourcePolygonOrPointOrEnvelope), sourcePolygonOrPointOrEnvelope, this.isSetPolygonOrPointOrEnvelope())); copy.unsetPolygonOrPointOrEnvelope(); if (copyPolygonOrPointOrEnvelope!= null) { List<Serializable> uniquePolygonOrPointOrEnvelopel = copy.getPolygonOrPointOrEnvelope(); uniquePolygonOrPointOrEnvelopel.addAll(copyPolygonOrPointOrEnvelope); } } else { if (polygonOrPointOrEnvelopeShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetPolygonOrPointOrEnvelope(); } } } } return draftCopy; } public Object createNewInstance() { return new BoundingGeometryType(); } 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) { if (right instanceof BoundingGeometryType) { final BoundingGeometryType target = this; final BoundingGeometryType leftObject = ((BoundingGeometryType) left); final BoundingGeometryType rightObject = ((BoundingGeometryType) right); { Boolean polygonOrPointOrEnvelopeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetPolygonOrPointOrEnvelope(), rightObject.isSetPolygonOrPointOrEnvelope()); if (polygonOrPointOrEnvelopeShouldBeMergedAndSet == Boolean.TRUE) { List<Serializable> lhsPolygonOrPointOrEnvelope; lhsPolygonOrPointOrEnvelope = (leftObject.isSetPolygonOrPointOrEnvelope()?leftObject.getPolygonOrPointOrEnvelope():null); List<Serializable> rhsPolygonOrPointOrEnvelope; rhsPolygonOrPointOrEnvelope = (rightObject.isSetPolygonOrPointOrEnvelope()?rightObject.getPolygonOrPointOrEnvelope():null); List<Serializable> mergedPolygonOrPointOrEnvelope = ((List<Serializable> ) strategy.merge(LocatorUtils.property(leftLocator, "polygonOrPointOrEnvelope", lhsPolygonOrPointOrEnvelope), LocatorUtils.property(rightLocator, "polygonOrPointOrEnvelope", rhsPolygonOrPointOrEnvelope), lhsPolygonOrPointOrEnvelope, rhsPolygonOrPointOrEnvelope, leftObject.isSetPolygonOrPointOrEnvelope(), rightObject.isSetPolygonOrPointOrEnvelope())); target.unsetPolygonOrPointOrEnvelope(); if (mergedPolygonOrPointOrEnvelope!= null) { List<Serializable> uniquePolygonOrPointOrEnvelopel = target.getPolygonOrPointOrEnvelope(); uniquePolygonOrPointOrEnvelopel.addAll(mergedPolygonOrPointOrEnvelope); } } else { if (polygonOrPointOrEnvelopeShouldBeMergedAndSet == Boolean.FALSE) { target.unsetPolygonOrPointOrEnvelope(); } } } } } public void setPolygonOrPointOrEnvelope(List<Serializable> value) { this.polygonOrPointOrEnvelope = null; if (value!= null) { List<Serializable> draftl = this.getPolygonOrPointOrEnvelope(); draftl.addAll(value); } } }