//
// 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.CharacterStringPropertyType;
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;
/**
* Handling restrictions imposed on the dataset because of national security, privacy, or other concerns
*
* <p>Java class for MD_SecurityConstraints_Type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="MD_SecurityConstraints_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gmd}MD_Constraints_Type">
* <sequence>
* <element name="classification" type="{http://www.isotc211.org/2005/gmd}MD_ClassificationCode_PropertyType"/>
* <element name="userNote" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* <element name="classificationSystem" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* <element name="handlingDescription" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MD_SecurityConstraints_Type", propOrder = {
"classification",
"userNote",
"classificationSystem",
"handlingDescription"
})
public class MDSecurityConstraintsType
extends MDConstraintsType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
@NotNull(message = "MDSecurityConstraintsType.classification {javax.validation.constraints.NotNull.message}")
@Valid
protected MDClassificationCodePropertyType classification;
@Valid
protected CharacterStringPropertyType userNote;
@Valid
protected CharacterStringPropertyType classificationSystem;
@Valid
protected CharacterStringPropertyType handlingDescription;
/**
* Gets the value of the classification property.
*
* @return
* possible object is
* {@link MDClassificationCodePropertyType }
*
*/
public MDClassificationCodePropertyType getClassification() {
return classification;
}
/**
* Sets the value of the classification property.
*
* @param value
* allowed object is
* {@link MDClassificationCodePropertyType }
*
*/
public void setClassification(MDClassificationCodePropertyType value) {
this.classification = value;
}
public boolean isSetClassification() {
return (this.classification!= null);
}
/**
* Gets the value of the userNote property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getUserNote() {
return userNote;
}
/**
* Sets the value of the userNote property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setUserNote(CharacterStringPropertyType value) {
this.userNote = value;
}
public boolean isSetUserNote() {
return (this.userNote!= null);
}
/**
* Gets the value of the classificationSystem property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getClassificationSystem() {
return classificationSystem;
}
/**
* Sets the value of the classificationSystem property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setClassificationSystem(CharacterStringPropertyType value) {
this.classificationSystem = value;
}
public boolean isSetClassificationSystem() {
return (this.classificationSystem!= null);
}
/**
* Gets the value of the handlingDescription property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getHandlingDescription() {
return handlingDescription;
}
/**
* Sets the value of the handlingDescription property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setHandlingDescription(CharacterStringPropertyType value) {
this.handlingDescription = value;
}
public boolean isSetHandlingDescription() {
return (this.handlingDescription!= 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);
{
MDClassificationCodePropertyType theClassification;
theClassification = this.getClassification();
strategy.appendField(locator, this, "classification", buffer, theClassification, this.isSetClassification());
}
{
CharacterStringPropertyType theUserNote;
theUserNote = this.getUserNote();
strategy.appendField(locator, this, "userNote", buffer, theUserNote, this.isSetUserNote());
}
{
CharacterStringPropertyType theClassificationSystem;
theClassificationSystem = this.getClassificationSystem();
strategy.appendField(locator, this, "classificationSystem", buffer, theClassificationSystem, this.isSetClassificationSystem());
}
{
CharacterStringPropertyType theHandlingDescription;
theHandlingDescription = this.getHandlingDescription();
strategy.appendField(locator, this, "handlingDescription", buffer, theHandlingDescription, this.isSetHandlingDescription());
}
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 MDSecurityConstraintsType that = ((MDSecurityConstraintsType) object);
{
MDClassificationCodePropertyType lhsClassification;
lhsClassification = this.getClassification();
MDClassificationCodePropertyType rhsClassification;
rhsClassification = that.getClassification();
if (!strategy.equals(LocatorUtils.property(thisLocator, "classification", lhsClassification), LocatorUtils.property(thatLocator, "classification", rhsClassification), lhsClassification, rhsClassification, this.isSetClassification(), that.isSetClassification())) {
return false;
}
}
{
CharacterStringPropertyType lhsUserNote;
lhsUserNote = this.getUserNote();
CharacterStringPropertyType rhsUserNote;
rhsUserNote = that.getUserNote();
if (!strategy.equals(LocatorUtils.property(thisLocator, "userNote", lhsUserNote), LocatorUtils.property(thatLocator, "userNote", rhsUserNote), lhsUserNote, rhsUserNote, this.isSetUserNote(), that.isSetUserNote())) {
return false;
}
}
{
CharacterStringPropertyType lhsClassificationSystem;
lhsClassificationSystem = this.getClassificationSystem();
CharacterStringPropertyType rhsClassificationSystem;
rhsClassificationSystem = that.getClassificationSystem();
if (!strategy.equals(LocatorUtils.property(thisLocator, "classificationSystem", lhsClassificationSystem), LocatorUtils.property(thatLocator, "classificationSystem", rhsClassificationSystem), lhsClassificationSystem, rhsClassificationSystem, this.isSetClassificationSystem(), that.isSetClassificationSystem())) {
return false;
}
}
{
CharacterStringPropertyType lhsHandlingDescription;
lhsHandlingDescription = this.getHandlingDescription();
CharacterStringPropertyType rhsHandlingDescription;
rhsHandlingDescription = that.getHandlingDescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "handlingDescription", lhsHandlingDescription), LocatorUtils.property(thatLocator, "handlingDescription", rhsHandlingDescription), lhsHandlingDescription, rhsHandlingDescription, this.isSetHandlingDescription(), that.isSetHandlingDescription())) {
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);
{
MDClassificationCodePropertyType theClassification;
theClassification = this.getClassification();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "classification", theClassification), currentHashCode, theClassification, this.isSetClassification());
}
{
CharacterStringPropertyType theUserNote;
theUserNote = this.getUserNote();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "userNote", theUserNote), currentHashCode, theUserNote, this.isSetUserNote());
}
{
CharacterStringPropertyType theClassificationSystem;
theClassificationSystem = this.getClassificationSystem();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "classificationSystem", theClassificationSystem), currentHashCode, theClassificationSystem, this.isSetClassificationSystem());
}
{
CharacterStringPropertyType theHandlingDescription;
theHandlingDescription = this.getHandlingDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "handlingDescription", theHandlingDescription), currentHashCode, theHandlingDescription, this.isSetHandlingDescription());
}
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 MDSecurityConstraintsType) {
final MDSecurityConstraintsType copy = ((MDSecurityConstraintsType) draftCopy);
{
Boolean classificationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetClassification());
if (classificationShouldBeCopiedAndSet == Boolean.TRUE) {
MDClassificationCodePropertyType sourceClassification;
sourceClassification = this.getClassification();
MDClassificationCodePropertyType copyClassification = ((MDClassificationCodePropertyType) strategy.copy(LocatorUtils.property(locator, "classification", sourceClassification), sourceClassification, this.isSetClassification()));
copy.setClassification(copyClassification);
} else {
if (classificationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.classification = null;
}
}
}
{
Boolean userNoteShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetUserNote());
if (userNoteShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceUserNote;
sourceUserNote = this.getUserNote();
CharacterStringPropertyType copyUserNote = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "userNote", sourceUserNote), sourceUserNote, this.isSetUserNote()));
copy.setUserNote(copyUserNote);
} else {
if (userNoteShouldBeCopiedAndSet == Boolean.FALSE) {
copy.userNote = null;
}
}
}
{
Boolean classificationSystemShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetClassificationSystem());
if (classificationSystemShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceClassificationSystem;
sourceClassificationSystem = this.getClassificationSystem();
CharacterStringPropertyType copyClassificationSystem = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "classificationSystem", sourceClassificationSystem), sourceClassificationSystem, this.isSetClassificationSystem()));
copy.setClassificationSystem(copyClassificationSystem);
} else {
if (classificationSystemShouldBeCopiedAndSet == Boolean.FALSE) {
copy.classificationSystem = null;
}
}
}
{
Boolean handlingDescriptionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetHandlingDescription());
if (handlingDescriptionShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceHandlingDescription;
sourceHandlingDescription = this.getHandlingDescription();
CharacterStringPropertyType copyHandlingDescription = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "handlingDescription", sourceHandlingDescription), sourceHandlingDescription, this.isSetHandlingDescription()));
copy.setHandlingDescription(copyHandlingDescription);
} else {
if (handlingDescriptionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.handlingDescription = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new MDSecurityConstraintsType();
}
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 MDSecurityConstraintsType) {
final MDSecurityConstraintsType target = this;
final MDSecurityConstraintsType leftObject = ((MDSecurityConstraintsType) left);
final MDSecurityConstraintsType rightObject = ((MDSecurityConstraintsType) right);
{
Boolean classificationShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetClassification(), rightObject.isSetClassification());
if (classificationShouldBeMergedAndSet == Boolean.TRUE) {
MDClassificationCodePropertyType lhsClassification;
lhsClassification = leftObject.getClassification();
MDClassificationCodePropertyType rhsClassification;
rhsClassification = rightObject.getClassification();
MDClassificationCodePropertyType mergedClassification = ((MDClassificationCodePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "classification", lhsClassification), LocatorUtils.property(rightLocator, "classification", rhsClassification), lhsClassification, rhsClassification, leftObject.isSetClassification(), rightObject.isSetClassification()));
target.setClassification(mergedClassification);
} else {
if (classificationShouldBeMergedAndSet == Boolean.FALSE) {
target.classification = null;
}
}
}
{
Boolean userNoteShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetUserNote(), rightObject.isSetUserNote());
if (userNoteShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsUserNote;
lhsUserNote = leftObject.getUserNote();
CharacterStringPropertyType rhsUserNote;
rhsUserNote = rightObject.getUserNote();
CharacterStringPropertyType mergedUserNote = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "userNote", lhsUserNote), LocatorUtils.property(rightLocator, "userNote", rhsUserNote), lhsUserNote, rhsUserNote, leftObject.isSetUserNote(), rightObject.isSetUserNote()));
target.setUserNote(mergedUserNote);
} else {
if (userNoteShouldBeMergedAndSet == Boolean.FALSE) {
target.userNote = null;
}
}
}
{
Boolean classificationSystemShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetClassificationSystem(), rightObject.isSetClassificationSystem());
if (classificationSystemShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsClassificationSystem;
lhsClassificationSystem = leftObject.getClassificationSystem();
CharacterStringPropertyType rhsClassificationSystem;
rhsClassificationSystem = rightObject.getClassificationSystem();
CharacterStringPropertyType mergedClassificationSystem = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "classificationSystem", lhsClassificationSystem), LocatorUtils.property(rightLocator, "classificationSystem", rhsClassificationSystem), lhsClassificationSystem, rhsClassificationSystem, leftObject.isSetClassificationSystem(), rightObject.isSetClassificationSystem()));
target.setClassificationSystem(mergedClassificationSystem);
} else {
if (classificationSystemShouldBeMergedAndSet == Boolean.FALSE) {
target.classificationSystem = null;
}
}
}
{
Boolean handlingDescriptionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetHandlingDescription(), rightObject.isSetHandlingDescription());
if (handlingDescriptionShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsHandlingDescription;
lhsHandlingDescription = leftObject.getHandlingDescription();
CharacterStringPropertyType rhsHandlingDescription;
rhsHandlingDescription = rightObject.getHandlingDescription();
CharacterStringPropertyType mergedHandlingDescription = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "handlingDescription", lhsHandlingDescription), LocatorUtils.property(rightLocator, "handlingDescription", rhsHandlingDescription), lhsHandlingDescription, rhsHandlingDescription, leftObject.isSetHandlingDescription(), rightObject.isSetHandlingDescription()));
target.setHandlingDescription(mergedHandlingDescription);
} else {
if (handlingDescriptionShouldBeMergedAndSet == Boolean.FALSE) {
target.handlingDescription = null;
}
}
}
}
}
}