// // 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 net.di2e.jaxb.cdr.describe.wrapper; 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.XmlRootElement; import javax.xml.bind.annotation.XmlType; import net.di2e.jaxb.cdr.describe.cc.ContentCollectionType; 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; import us.mil.ces.metadata.ddms._5.ResourceType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element ref="{urn:us:mil:ces:metadata:ddms:5}resource"/> * <element ref="{urn:cdr-ex:describe:cc:1.0}contentCollection"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "resource", "contentCollection" }) @XmlRootElement(name = "contentCollection") public class Collection implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(namespace = "urn:us:mil:ces:metadata:ddms:5", required = true) @NotNull(message = "ContentCollection.resource {javax.validation.constraints.NotNull.message}") @Valid protected ResourceType resource; @XmlElement(namespace = "urn:cdr-ex:describe:cc:1.0", required = true) @NotNull(message = "ContentCollection.contentCollection {javax.validation.constraints.NotNull.message}") @Valid protected ContentCollectionType contentCollection; /** * Gets the value of the resource property. * * @return * possible object is * {@link ResourceType } * */ public ResourceType getResource() { return resource; } /** * Sets the value of the resource property. * * @param value * allowed object is * {@link ResourceType } * */ public void setResource(ResourceType value) { this.resource = value; } public boolean isSetResource() { return (this.resource!= null); } /** * Gets the value of the contentCollection property. * * @return * possible object is * {@link ContentCollectionType } * */ public ContentCollectionType getContentCollection() { return contentCollection; } /** * Sets the value of the contentCollection property. * * @param value * allowed object is * {@link ContentCollectionType } * */ public void setContentCollection(ContentCollectionType value) { this.contentCollection = value; } public boolean isSetContentCollection() { return (this.contentCollection!= 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) { { ResourceType theResource; theResource = this.getResource(); strategy.appendField(locator, this, "resource", buffer, theResource, this.isSetResource()); } { ContentCollectionType theContentCollection; theContentCollection = this.getContentCollection(); strategy.appendField(locator, this, "contentCollection", buffer, theContentCollection, this.isSetContentCollection()); } 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 Collection that = ((Collection) object); { ResourceType lhsResource; lhsResource = this.getResource(); ResourceType rhsResource; rhsResource = that.getResource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "resource", lhsResource), LocatorUtils.property(thatLocator, "resource", rhsResource), lhsResource, rhsResource, this.isSetResource(), that.isSetResource())) { return false; } } { ContentCollectionType lhsContentCollection; lhsContentCollection = this.getContentCollection(); ContentCollectionType rhsContentCollection; rhsContentCollection = that.getContentCollection(); if (!strategy.equals(LocatorUtils.property(thisLocator, "contentCollection", lhsContentCollection), LocatorUtils.property(thatLocator, "contentCollection", rhsContentCollection), lhsContentCollection, rhsContentCollection, this.isSetContentCollection(), that.isSetContentCollection())) { 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; { ResourceType theResource; theResource = this.getResource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "resource", theResource), currentHashCode, theResource, this.isSetResource()); } { ContentCollectionType theContentCollection; theContentCollection = this.getContentCollection(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contentCollection", theContentCollection), currentHashCode, theContentCollection, this.isSetContentCollection()); } 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 Collection) { final Collection copy = ((Collection) draftCopy); { Boolean resourceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetResource()); if (resourceShouldBeCopiedAndSet == Boolean.TRUE) { ResourceType sourceResource; sourceResource = this.getResource(); ResourceType copyResource = ((ResourceType) strategy.copy(LocatorUtils.property(locator, "resource", sourceResource), sourceResource, this.isSetResource())); copy.setResource(copyResource); } else { if (resourceShouldBeCopiedAndSet == Boolean.FALSE) { copy.resource = null; } } } { Boolean contentCollectionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetContentCollection()); if (contentCollectionShouldBeCopiedAndSet == Boolean.TRUE) { ContentCollectionType sourceContentCollection; sourceContentCollection = this.getContentCollection(); ContentCollectionType copyContentCollection = ((ContentCollectionType) strategy.copy(LocatorUtils.property(locator, "contentCollection", sourceContentCollection), sourceContentCollection, this.isSetContentCollection())); copy.setContentCollection(copyContentCollection); } else { if (contentCollectionShouldBeCopiedAndSet == Boolean.FALSE) { copy.contentCollection = null; } } } } return draftCopy; } public Object createNewInstance() { return new Collection(); } 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 Collection) { final Collection target = this; final Collection leftObject = ((Collection) left); final Collection rightObject = ((Collection) right); { Boolean resourceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetResource(), rightObject.isSetResource()); if (resourceShouldBeMergedAndSet == Boolean.TRUE) { ResourceType lhsResource; lhsResource = leftObject.getResource(); ResourceType rhsResource; rhsResource = rightObject.getResource(); ResourceType mergedResource = ((ResourceType) strategy.merge(LocatorUtils.property(leftLocator, "resource", lhsResource), LocatorUtils.property(rightLocator, "resource", rhsResource), lhsResource, rhsResource, leftObject.isSetResource(), rightObject.isSetResource())); target.setResource(mergedResource); } else { if (resourceShouldBeMergedAndSet == Boolean.FALSE) { target.resource = null; } } } { Boolean contentCollectionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetContentCollection(), rightObject.isSetContentCollection()); if (contentCollectionShouldBeMergedAndSet == Boolean.TRUE) { ContentCollectionType lhsContentCollection; lhsContentCollection = leftObject.getContentCollection(); ContentCollectionType rhsContentCollection; rhsContentCollection = rightObject.getContentCollection(); ContentCollectionType mergedContentCollection = ((ContentCollectionType) strategy.merge(LocatorUtils.property(leftLocator, "contentCollection", lhsContentCollection), LocatorUtils.property(rightLocator, "contentCollection", rhsContentCollection), lhsContentCollection, rhsContentCollection, leftObject.isSetContentCollection(), rightObject.isSetContentCollection())); target.setContentCollection(mergedContentCollection); } else { if (contentCollectionShouldBeMergedAndSet == Boolean.FALSE) { target.contentCollection = null; } } } } } }