// // 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 javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; 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; /** * <p>Java class for RightsType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="RightsType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <attribute name="privacyAct" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> * <attribute name="intellectualProperty" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> * <attribute name="copyright" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RightsType") public class RightsType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlAttribute(name = "privacyAct", namespace = "urn:us:mil:ces:metadata:ddms:5") protected Boolean privacyAct; @XmlAttribute(name = "intellectualProperty", namespace = "urn:us:mil:ces:metadata:ddms:5") protected Boolean intellectualProperty; @XmlAttribute(name = "copyright", namespace = "urn:us:mil:ces:metadata:ddms:5") protected Boolean copyright; /** * Gets the value of the privacyAct property. * * @return * possible object is * {@link Boolean } * */ public boolean getPrivacyAct() { if (privacyAct == null) { return false; } else { return privacyAct; } } /** * Sets the value of the privacyAct property. * * @param value * allowed object is * {@link Boolean } * */ public void setPrivacyAct(boolean value) { this.privacyAct = value; } public boolean isSetPrivacyAct() { return (this.privacyAct!= null); } public void unsetPrivacyAct() { this.privacyAct = null; } /** * Gets the value of the intellectualProperty property. * * @return * possible object is * {@link Boolean } * */ public boolean getIntellectualProperty() { if (intellectualProperty == null) { return false; } else { return intellectualProperty; } } /** * Sets the value of the intellectualProperty property. * * @param value * allowed object is * {@link Boolean } * */ public void setIntellectualProperty(boolean value) { this.intellectualProperty = value; } public boolean isSetIntellectualProperty() { return (this.intellectualProperty!= null); } public void unsetIntellectualProperty() { this.intellectualProperty = null; } /** * Gets the value of the copyright property. * * @return * possible object is * {@link Boolean } * */ public boolean getCopyright() { if (copyright == null) { return false; } else { return copyright; } } /** * Sets the value of the copyright property. * * @param value * allowed object is * {@link Boolean } * */ public void setCopyright(boolean value) { this.copyright = value; } public boolean isSetCopyright() { return (this.copyright!= null); } public void unsetCopyright() { this.copyright = 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) { { boolean thePrivacyAct; thePrivacyAct = (this.isSetPrivacyAct()?this.getPrivacyAct():false); strategy.appendField(locator, this, "privacyAct", buffer, thePrivacyAct, this.isSetPrivacyAct()); } { boolean theIntellectualProperty; theIntellectualProperty = (this.isSetIntellectualProperty()?this.getIntellectualProperty():false); strategy.appendField(locator, this, "intellectualProperty", buffer, theIntellectualProperty, this.isSetIntellectualProperty()); } { boolean theCopyright; theCopyright = (this.isSetCopyright()?this.getCopyright():false); strategy.appendField(locator, this, "copyright", buffer, theCopyright, this.isSetCopyright()); } 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 RightsType that = ((RightsType) object); { boolean lhsPrivacyAct; lhsPrivacyAct = (this.isSetPrivacyAct()?this.getPrivacyAct():false); boolean rhsPrivacyAct; rhsPrivacyAct = (that.isSetPrivacyAct()?that.getPrivacyAct():false); if (!strategy.equals(LocatorUtils.property(thisLocator, "privacyAct", lhsPrivacyAct), LocatorUtils.property(thatLocator, "privacyAct", rhsPrivacyAct), lhsPrivacyAct, rhsPrivacyAct, this.isSetPrivacyAct(), that.isSetPrivacyAct())) { return false; } } { boolean lhsIntellectualProperty; lhsIntellectualProperty = (this.isSetIntellectualProperty()?this.getIntellectualProperty():false); boolean rhsIntellectualProperty; rhsIntellectualProperty = (that.isSetIntellectualProperty()?that.getIntellectualProperty():false); if (!strategy.equals(LocatorUtils.property(thisLocator, "intellectualProperty", lhsIntellectualProperty), LocatorUtils.property(thatLocator, "intellectualProperty", rhsIntellectualProperty), lhsIntellectualProperty, rhsIntellectualProperty, this.isSetIntellectualProperty(), that.isSetIntellectualProperty())) { return false; } } { boolean lhsCopyright; lhsCopyright = (this.isSetCopyright()?this.getCopyright():false); boolean rhsCopyright; rhsCopyright = (that.isSetCopyright()?that.getCopyright():false); if (!strategy.equals(LocatorUtils.property(thisLocator, "copyright", lhsCopyright), LocatorUtils.property(thatLocator, "copyright", rhsCopyright), lhsCopyright, rhsCopyright, this.isSetCopyright(), that.isSetCopyright())) { 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; { boolean thePrivacyAct; thePrivacyAct = (this.isSetPrivacyAct()?this.getPrivacyAct():false); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "privacyAct", thePrivacyAct), currentHashCode, thePrivacyAct, this.isSetPrivacyAct()); } { boolean theIntellectualProperty; theIntellectualProperty = (this.isSetIntellectualProperty()?this.getIntellectualProperty():false); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intellectualProperty", theIntellectualProperty), currentHashCode, theIntellectualProperty, this.isSetIntellectualProperty()); } { boolean theCopyright; theCopyright = (this.isSetCopyright()?this.getCopyright():false); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "copyright", theCopyright), currentHashCode, theCopyright, this.isSetCopyright()); } 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 RightsType) { final RightsType copy = ((RightsType) draftCopy); { Boolean privacyActShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetPrivacyAct()); if (privacyActShouldBeCopiedAndSet == Boolean.TRUE) { boolean sourcePrivacyAct; sourcePrivacyAct = (this.isSetPrivacyAct()?this.getPrivacyAct():false); boolean copyPrivacyAct = strategy.copy(LocatorUtils.property(locator, "privacyAct", sourcePrivacyAct), sourcePrivacyAct, this.isSetPrivacyAct()); copy.setPrivacyAct(copyPrivacyAct); } else { if (privacyActShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetPrivacyAct(); } } } { Boolean intellectualPropertyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetIntellectualProperty()); if (intellectualPropertyShouldBeCopiedAndSet == Boolean.TRUE) { boolean sourceIntellectualProperty; sourceIntellectualProperty = (this.isSetIntellectualProperty()?this.getIntellectualProperty():false); boolean copyIntellectualProperty = strategy.copy(LocatorUtils.property(locator, "intellectualProperty", sourceIntellectualProperty), sourceIntellectualProperty, this.isSetIntellectualProperty()); copy.setIntellectualProperty(copyIntellectualProperty); } else { if (intellectualPropertyShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetIntellectualProperty(); } } } { Boolean copyrightShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetCopyright()); if (copyrightShouldBeCopiedAndSet == Boolean.TRUE) { boolean sourceCopyright; sourceCopyright = (this.isSetCopyright()?this.getCopyright():false); boolean copyCopyright = strategy.copy(LocatorUtils.property(locator, "copyright", sourceCopyright), sourceCopyright, this.isSetCopyright()); copy.setCopyright(copyCopyright); } else { if (copyrightShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetCopyright(); } } } } return draftCopy; } public Object createNewInstance() { return new RightsType(); } 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 RightsType) { final RightsType target = this; final RightsType leftObject = ((RightsType) left); final RightsType rightObject = ((RightsType) right); { Boolean privacyActShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetPrivacyAct(), rightObject.isSetPrivacyAct()); if (privacyActShouldBeMergedAndSet == Boolean.TRUE) { boolean lhsPrivacyAct; lhsPrivacyAct = (leftObject.isSetPrivacyAct()?leftObject.getPrivacyAct():false); boolean rhsPrivacyAct; rhsPrivacyAct = (rightObject.isSetPrivacyAct()?rightObject.getPrivacyAct():false); boolean mergedPrivacyAct = ((boolean) strategy.merge(LocatorUtils.property(leftLocator, "privacyAct", lhsPrivacyAct), LocatorUtils.property(rightLocator, "privacyAct", rhsPrivacyAct), lhsPrivacyAct, rhsPrivacyAct, leftObject.isSetPrivacyAct(), rightObject.isSetPrivacyAct())); target.setPrivacyAct(mergedPrivacyAct); } else { if (privacyActShouldBeMergedAndSet == Boolean.FALSE) { target.unsetPrivacyAct(); } } } { Boolean intellectualPropertyShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetIntellectualProperty(), rightObject.isSetIntellectualProperty()); if (intellectualPropertyShouldBeMergedAndSet == Boolean.TRUE) { boolean lhsIntellectualProperty; lhsIntellectualProperty = (leftObject.isSetIntellectualProperty()?leftObject.getIntellectualProperty():false); boolean rhsIntellectualProperty; rhsIntellectualProperty = (rightObject.isSetIntellectualProperty()?rightObject.getIntellectualProperty():false); boolean mergedIntellectualProperty = ((boolean) strategy.merge(LocatorUtils.property(leftLocator, "intellectualProperty", lhsIntellectualProperty), LocatorUtils.property(rightLocator, "intellectualProperty", rhsIntellectualProperty), lhsIntellectualProperty, rhsIntellectualProperty, leftObject.isSetIntellectualProperty(), rightObject.isSetIntellectualProperty())); target.setIntellectualProperty(mergedIntellectualProperty); } else { if (intellectualPropertyShouldBeMergedAndSet == Boolean.FALSE) { target.unsetIntellectualProperty(); } } } { Boolean copyrightShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetCopyright(), rightObject.isSetCopyright()); if (copyrightShouldBeMergedAndSet == Boolean.TRUE) { boolean lhsCopyright; lhsCopyright = (leftObject.isSetCopyright()?leftObject.getCopyright():false); boolean rhsCopyright; rhsCopyright = (rightObject.isSetCopyright()?rightObject.getCopyright():false); boolean mergedCopyright = ((boolean) strategy.merge(LocatorUtils.property(leftLocator, "copyright", lhsCopyright), LocatorUtils.property(rightLocator, "copyright", rhsCopyright), lhsCopyright, rhsCopyright, leftObject.isSetCopyright(), rightObject.isSetCopyright())); target.setCopyright(mergedCopyright); } else { if (copyrightShouldBeMergedAndSet == Boolean.FALSE) { target.unsetCopyright(); } } } } } }