//
// 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.AbstractObjectType;
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;
/**
* Graphic that provides an illustration of the dataset (should include a legend for the graphic)
*
* <p>Java class for MD_BrowseGraphic_Type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="MD_BrowseGraphic_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type">
* <sequence>
* <element name="fileName" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType"/>
* <element name="fileDescription" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* <element name="fileType" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MD_BrowseGraphic_Type", propOrder = {
"fileName",
"fileDescription",
"fileType"
})
public class MDBrowseGraphicType
extends AbstractObjectType
implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
@NotNull(message = "MDBrowseGraphicType.fileName {javax.validation.constraints.NotNull.message}")
@Valid
protected CharacterStringPropertyType fileName;
@Valid
protected CharacterStringPropertyType fileDescription;
@Valid
protected CharacterStringPropertyType fileType;
/**
* Gets the value of the fileName property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getFileName() {
return fileName;
}
/**
* Sets the value of the fileName property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setFileName(CharacterStringPropertyType value) {
this.fileName = value;
}
public boolean isSetFileName() {
return (this.fileName!= null);
}
/**
* Gets the value of the fileDescription property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getFileDescription() {
return fileDescription;
}
/**
* Sets the value of the fileDescription property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setFileDescription(CharacterStringPropertyType value) {
this.fileDescription = value;
}
public boolean isSetFileDescription() {
return (this.fileDescription!= null);
}
/**
* Gets the value of the fileType property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getFileType() {
return fileType;
}
/**
* Sets the value of the fileType property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setFileType(CharacterStringPropertyType value) {
this.fileType = value;
}
public boolean isSetFileType() {
return (this.fileType!= 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);
{
CharacterStringPropertyType theFileName;
theFileName = this.getFileName();
strategy.appendField(locator, this, "fileName", buffer, theFileName, this.isSetFileName());
}
{
CharacterStringPropertyType theFileDescription;
theFileDescription = this.getFileDescription();
strategy.appendField(locator, this, "fileDescription", buffer, theFileDescription, this.isSetFileDescription());
}
{
CharacterStringPropertyType theFileType;
theFileType = this.getFileType();
strategy.appendField(locator, this, "fileType", buffer, theFileType, this.isSetFileType());
}
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 MDBrowseGraphicType that = ((MDBrowseGraphicType) object);
{
CharacterStringPropertyType lhsFileName;
lhsFileName = this.getFileName();
CharacterStringPropertyType rhsFileName;
rhsFileName = that.getFileName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "fileName", lhsFileName), LocatorUtils.property(thatLocator, "fileName", rhsFileName), lhsFileName, rhsFileName, this.isSetFileName(), that.isSetFileName())) {
return false;
}
}
{
CharacterStringPropertyType lhsFileDescription;
lhsFileDescription = this.getFileDescription();
CharacterStringPropertyType rhsFileDescription;
rhsFileDescription = that.getFileDescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "fileDescription", lhsFileDescription), LocatorUtils.property(thatLocator, "fileDescription", rhsFileDescription), lhsFileDescription, rhsFileDescription, this.isSetFileDescription(), that.isSetFileDescription())) {
return false;
}
}
{
CharacterStringPropertyType lhsFileType;
lhsFileType = this.getFileType();
CharacterStringPropertyType rhsFileType;
rhsFileType = that.getFileType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "fileType", lhsFileType), LocatorUtils.property(thatLocator, "fileType", rhsFileType), lhsFileType, rhsFileType, this.isSetFileType(), that.isSetFileType())) {
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);
{
CharacterStringPropertyType theFileName;
theFileName = this.getFileName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fileName", theFileName), currentHashCode, theFileName, this.isSetFileName());
}
{
CharacterStringPropertyType theFileDescription;
theFileDescription = this.getFileDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fileDescription", theFileDescription), currentHashCode, theFileDescription, this.isSetFileDescription());
}
{
CharacterStringPropertyType theFileType;
theFileType = this.getFileType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fileType", theFileType), currentHashCode, theFileType, this.isSetFileType());
}
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 MDBrowseGraphicType) {
final MDBrowseGraphicType copy = ((MDBrowseGraphicType) draftCopy);
{
Boolean fileNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetFileName());
if (fileNameShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceFileName;
sourceFileName = this.getFileName();
CharacterStringPropertyType copyFileName = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "fileName", sourceFileName), sourceFileName, this.isSetFileName()));
copy.setFileName(copyFileName);
} else {
if (fileNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.fileName = null;
}
}
}
{
Boolean fileDescriptionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetFileDescription());
if (fileDescriptionShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceFileDescription;
sourceFileDescription = this.getFileDescription();
CharacterStringPropertyType copyFileDescription = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "fileDescription", sourceFileDescription), sourceFileDescription, this.isSetFileDescription()));
copy.setFileDescription(copyFileDescription);
} else {
if (fileDescriptionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.fileDescription = null;
}
}
}
{
Boolean fileTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetFileType());
if (fileTypeShouldBeCopiedAndSet == Boolean.TRUE) {
CharacterStringPropertyType sourceFileType;
sourceFileType = this.getFileType();
CharacterStringPropertyType copyFileType = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "fileType", sourceFileType), sourceFileType, this.isSetFileType()));
copy.setFileType(copyFileType);
} else {
if (fileTypeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.fileType = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new MDBrowseGraphicType();
}
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 MDBrowseGraphicType) {
final MDBrowseGraphicType target = this;
final MDBrowseGraphicType leftObject = ((MDBrowseGraphicType) left);
final MDBrowseGraphicType rightObject = ((MDBrowseGraphicType) right);
{
Boolean fileNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetFileName(), rightObject.isSetFileName());
if (fileNameShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsFileName;
lhsFileName = leftObject.getFileName();
CharacterStringPropertyType rhsFileName;
rhsFileName = rightObject.getFileName();
CharacterStringPropertyType mergedFileName = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "fileName", lhsFileName), LocatorUtils.property(rightLocator, "fileName", rhsFileName), lhsFileName, rhsFileName, leftObject.isSetFileName(), rightObject.isSetFileName()));
target.setFileName(mergedFileName);
} else {
if (fileNameShouldBeMergedAndSet == Boolean.FALSE) {
target.fileName = null;
}
}
}
{
Boolean fileDescriptionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetFileDescription(), rightObject.isSetFileDescription());
if (fileDescriptionShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsFileDescription;
lhsFileDescription = leftObject.getFileDescription();
CharacterStringPropertyType rhsFileDescription;
rhsFileDescription = rightObject.getFileDescription();
CharacterStringPropertyType mergedFileDescription = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "fileDescription", lhsFileDescription), LocatorUtils.property(rightLocator, "fileDescription", rhsFileDescription), lhsFileDescription, rhsFileDescription, leftObject.isSetFileDescription(), rightObject.isSetFileDescription()));
target.setFileDescription(mergedFileDescription);
} else {
if (fileDescriptionShouldBeMergedAndSet == Boolean.FALSE) {
target.fileDescription = null;
}
}
}
{
Boolean fileTypeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetFileType(), rightObject.isSetFileType());
if (fileTypeShouldBeMergedAndSet == Boolean.TRUE) {
CharacterStringPropertyType lhsFileType;
lhsFileType = leftObject.getFileType();
CharacterStringPropertyType rhsFileType;
rhsFileType = rightObject.getFileType();
CharacterStringPropertyType mergedFileType = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "fileType", lhsFileType), LocatorUtils.property(rightLocator, "fileType", rhsFileType), lhsFileType, rhsFileType, leftObject.isSetFileType(), rightObject.isSetFileType()));
target.setFileType(mergedFileType);
} else {
if (fileTypeShouldBeMergedAndSet == Boolean.FALSE) {
target.fileType = null;
}
}
}
}
}
}