// // 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; /** * Identification of, and means of communication with, person(s) and organisations associated with the dataset * * <p>Java class for CI_ResponsibleParty_Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="CI_ResponsibleParty_Type"> * <complexContent> * <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type"> * <sequence> * <element name="individualName" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/> * <element name="organisationName" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/> * <element name="positionName" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType" minOccurs="0"/> * <element name="contactInfo" type="{http://www.isotc211.org/2005/gmd}CI_Contact_PropertyType" minOccurs="0"/> * <element name="role" type="{http://www.isotc211.org/2005/gmd}CI_RoleCode_PropertyType"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CI_ResponsibleParty_Type", propOrder = { "individualName", "organisationName", "positionName", "contactInfo", "role" }) public class CIResponsiblePartyType extends AbstractObjectType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @Valid protected CharacterStringPropertyType individualName; @Valid protected CharacterStringPropertyType organisationName; @Valid protected CharacterStringPropertyType positionName; @Valid protected CIContactPropertyType contactInfo; @XmlElement(required = true) @NotNull(message = "CIResponsiblePartyType.role {javax.validation.constraints.NotNull.message}") @Valid protected CIRoleCodePropertyType role; /** * Gets the value of the individualName property. * * @return * possible object is * {@link CharacterStringPropertyType } * */ public CharacterStringPropertyType getIndividualName() { return individualName; } /** * Sets the value of the individualName property. * * @param value * allowed object is * {@link CharacterStringPropertyType } * */ public void setIndividualName(CharacterStringPropertyType value) { this.individualName = value; } public boolean isSetIndividualName() { return (this.individualName!= null); } /** * Gets the value of the organisationName property. * * @return * possible object is * {@link CharacterStringPropertyType } * */ public CharacterStringPropertyType getOrganisationName() { return organisationName; } /** * Sets the value of the organisationName property. * * @param value * allowed object is * {@link CharacterStringPropertyType } * */ public void setOrganisationName(CharacterStringPropertyType value) { this.organisationName = value; } public boolean isSetOrganisationName() { return (this.organisationName!= null); } /** * Gets the value of the positionName property. * * @return * possible object is * {@link CharacterStringPropertyType } * */ public CharacterStringPropertyType getPositionName() { return positionName; } /** * Sets the value of the positionName property. * * @param value * allowed object is * {@link CharacterStringPropertyType } * */ public void setPositionName(CharacterStringPropertyType value) { this.positionName = value; } public boolean isSetPositionName() { return (this.positionName!= null); } /** * Gets the value of the contactInfo property. * * @return * possible object is * {@link CIContactPropertyType } * */ public CIContactPropertyType getContactInfo() { return contactInfo; } /** * Sets the value of the contactInfo property. * * @param value * allowed object is * {@link CIContactPropertyType } * */ public void setContactInfo(CIContactPropertyType value) { this.contactInfo = value; } public boolean isSetContactInfo() { return (this.contactInfo!= null); } /** * Gets the value of the role property. * * @return * possible object is * {@link CIRoleCodePropertyType } * */ public CIRoleCodePropertyType getRole() { return role; } /** * Sets the value of the role property. * * @param value * allowed object is * {@link CIRoleCodePropertyType } * */ public void setRole(CIRoleCodePropertyType value) { this.role = value; } public boolean isSetRole() { return (this.role!= 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 theIndividualName; theIndividualName = this.getIndividualName(); strategy.appendField(locator, this, "individualName", buffer, theIndividualName, this.isSetIndividualName()); } { CharacterStringPropertyType theOrganisationName; theOrganisationName = this.getOrganisationName(); strategy.appendField(locator, this, "organisationName", buffer, theOrganisationName, this.isSetOrganisationName()); } { CharacterStringPropertyType thePositionName; thePositionName = this.getPositionName(); strategy.appendField(locator, this, "positionName", buffer, thePositionName, this.isSetPositionName()); } { CIContactPropertyType theContactInfo; theContactInfo = this.getContactInfo(); strategy.appendField(locator, this, "contactInfo", buffer, theContactInfo, this.isSetContactInfo()); } { CIRoleCodePropertyType theRole; theRole = this.getRole(); strategy.appendField(locator, this, "role", buffer, theRole, this.isSetRole()); } 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 CIResponsiblePartyType that = ((CIResponsiblePartyType) object); { CharacterStringPropertyType lhsIndividualName; lhsIndividualName = this.getIndividualName(); CharacterStringPropertyType rhsIndividualName; rhsIndividualName = that.getIndividualName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "individualName", lhsIndividualName), LocatorUtils.property(thatLocator, "individualName", rhsIndividualName), lhsIndividualName, rhsIndividualName, this.isSetIndividualName(), that.isSetIndividualName())) { return false; } } { CharacterStringPropertyType lhsOrganisationName; lhsOrganisationName = this.getOrganisationName(); CharacterStringPropertyType rhsOrganisationName; rhsOrganisationName = that.getOrganisationName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "organisationName", lhsOrganisationName), LocatorUtils.property(thatLocator, "organisationName", rhsOrganisationName), lhsOrganisationName, rhsOrganisationName, this.isSetOrganisationName(), that.isSetOrganisationName())) { return false; } } { CharacterStringPropertyType lhsPositionName; lhsPositionName = this.getPositionName(); CharacterStringPropertyType rhsPositionName; rhsPositionName = that.getPositionName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "positionName", lhsPositionName), LocatorUtils.property(thatLocator, "positionName", rhsPositionName), lhsPositionName, rhsPositionName, this.isSetPositionName(), that.isSetPositionName())) { return false; } } { CIContactPropertyType lhsContactInfo; lhsContactInfo = this.getContactInfo(); CIContactPropertyType rhsContactInfo; rhsContactInfo = that.getContactInfo(); if (!strategy.equals(LocatorUtils.property(thisLocator, "contactInfo", lhsContactInfo), LocatorUtils.property(thatLocator, "contactInfo", rhsContactInfo), lhsContactInfo, rhsContactInfo, this.isSetContactInfo(), that.isSetContactInfo())) { return false; } } { CIRoleCodePropertyType lhsRole; lhsRole = this.getRole(); CIRoleCodePropertyType rhsRole; rhsRole = that.getRole(); if (!strategy.equals(LocatorUtils.property(thisLocator, "role", lhsRole), LocatorUtils.property(thatLocator, "role", rhsRole), lhsRole, rhsRole, this.isSetRole(), that.isSetRole())) { 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 theIndividualName; theIndividualName = this.getIndividualName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "individualName", theIndividualName), currentHashCode, theIndividualName, this.isSetIndividualName()); } { CharacterStringPropertyType theOrganisationName; theOrganisationName = this.getOrganisationName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "organisationName", theOrganisationName), currentHashCode, theOrganisationName, this.isSetOrganisationName()); } { CharacterStringPropertyType thePositionName; thePositionName = this.getPositionName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "positionName", thePositionName), currentHashCode, thePositionName, this.isSetPositionName()); } { CIContactPropertyType theContactInfo; theContactInfo = this.getContactInfo(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contactInfo", theContactInfo), currentHashCode, theContactInfo, this.isSetContactInfo()); } { CIRoleCodePropertyType theRole; theRole = this.getRole(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "role", theRole), currentHashCode, theRole, this.isSetRole()); } 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 CIResponsiblePartyType) { final CIResponsiblePartyType copy = ((CIResponsiblePartyType) draftCopy); { Boolean individualNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetIndividualName()); if (individualNameShouldBeCopiedAndSet == Boolean.TRUE) { CharacterStringPropertyType sourceIndividualName; sourceIndividualName = this.getIndividualName(); CharacterStringPropertyType copyIndividualName = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "individualName", sourceIndividualName), sourceIndividualName, this.isSetIndividualName())); copy.setIndividualName(copyIndividualName); } else { if (individualNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.individualName = null; } } } { Boolean organisationNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetOrganisationName()); if (organisationNameShouldBeCopiedAndSet == Boolean.TRUE) { CharacterStringPropertyType sourceOrganisationName; sourceOrganisationName = this.getOrganisationName(); CharacterStringPropertyType copyOrganisationName = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "organisationName", sourceOrganisationName), sourceOrganisationName, this.isSetOrganisationName())); copy.setOrganisationName(copyOrganisationName); } else { if (organisationNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.organisationName = null; } } } { Boolean positionNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetPositionName()); if (positionNameShouldBeCopiedAndSet == Boolean.TRUE) { CharacterStringPropertyType sourcePositionName; sourcePositionName = this.getPositionName(); CharacterStringPropertyType copyPositionName = ((CharacterStringPropertyType) strategy.copy(LocatorUtils.property(locator, "positionName", sourcePositionName), sourcePositionName, this.isSetPositionName())); copy.setPositionName(copyPositionName); } else { if (positionNameShouldBeCopiedAndSet == Boolean.FALSE) { copy.positionName = null; } } } { Boolean contactInfoShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetContactInfo()); if (contactInfoShouldBeCopiedAndSet == Boolean.TRUE) { CIContactPropertyType sourceContactInfo; sourceContactInfo = this.getContactInfo(); CIContactPropertyType copyContactInfo = ((CIContactPropertyType) strategy.copy(LocatorUtils.property(locator, "contactInfo", sourceContactInfo), sourceContactInfo, this.isSetContactInfo())); copy.setContactInfo(copyContactInfo); } else { if (contactInfoShouldBeCopiedAndSet == Boolean.FALSE) { copy.contactInfo = null; } } } { Boolean roleShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetRole()); if (roleShouldBeCopiedAndSet == Boolean.TRUE) { CIRoleCodePropertyType sourceRole; sourceRole = this.getRole(); CIRoleCodePropertyType copyRole = ((CIRoleCodePropertyType) strategy.copy(LocatorUtils.property(locator, "role", sourceRole), sourceRole, this.isSetRole())); copy.setRole(copyRole); } else { if (roleShouldBeCopiedAndSet == Boolean.FALSE) { copy.role = null; } } } } return draftCopy; } public Object createNewInstance() { return new CIResponsiblePartyType(); } 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 CIResponsiblePartyType) { final CIResponsiblePartyType target = this; final CIResponsiblePartyType leftObject = ((CIResponsiblePartyType) left); final CIResponsiblePartyType rightObject = ((CIResponsiblePartyType) right); { Boolean individualNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetIndividualName(), rightObject.isSetIndividualName()); if (individualNameShouldBeMergedAndSet == Boolean.TRUE) { CharacterStringPropertyType lhsIndividualName; lhsIndividualName = leftObject.getIndividualName(); CharacterStringPropertyType rhsIndividualName; rhsIndividualName = rightObject.getIndividualName(); CharacterStringPropertyType mergedIndividualName = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "individualName", lhsIndividualName), LocatorUtils.property(rightLocator, "individualName", rhsIndividualName), lhsIndividualName, rhsIndividualName, leftObject.isSetIndividualName(), rightObject.isSetIndividualName())); target.setIndividualName(mergedIndividualName); } else { if (individualNameShouldBeMergedAndSet == Boolean.FALSE) { target.individualName = null; } } } { Boolean organisationNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetOrganisationName(), rightObject.isSetOrganisationName()); if (organisationNameShouldBeMergedAndSet == Boolean.TRUE) { CharacterStringPropertyType lhsOrganisationName; lhsOrganisationName = leftObject.getOrganisationName(); CharacterStringPropertyType rhsOrganisationName; rhsOrganisationName = rightObject.getOrganisationName(); CharacterStringPropertyType mergedOrganisationName = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "organisationName", lhsOrganisationName), LocatorUtils.property(rightLocator, "organisationName", rhsOrganisationName), lhsOrganisationName, rhsOrganisationName, leftObject.isSetOrganisationName(), rightObject.isSetOrganisationName())); target.setOrganisationName(mergedOrganisationName); } else { if (organisationNameShouldBeMergedAndSet == Boolean.FALSE) { target.organisationName = null; } } } { Boolean positionNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetPositionName(), rightObject.isSetPositionName()); if (positionNameShouldBeMergedAndSet == Boolean.TRUE) { CharacterStringPropertyType lhsPositionName; lhsPositionName = leftObject.getPositionName(); CharacterStringPropertyType rhsPositionName; rhsPositionName = rightObject.getPositionName(); CharacterStringPropertyType mergedPositionName = ((CharacterStringPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "positionName", lhsPositionName), LocatorUtils.property(rightLocator, "positionName", rhsPositionName), lhsPositionName, rhsPositionName, leftObject.isSetPositionName(), rightObject.isSetPositionName())); target.setPositionName(mergedPositionName); } else { if (positionNameShouldBeMergedAndSet == Boolean.FALSE) { target.positionName = null; } } } { Boolean contactInfoShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetContactInfo(), rightObject.isSetContactInfo()); if (contactInfoShouldBeMergedAndSet == Boolean.TRUE) { CIContactPropertyType lhsContactInfo; lhsContactInfo = leftObject.getContactInfo(); CIContactPropertyType rhsContactInfo; rhsContactInfo = rightObject.getContactInfo(); CIContactPropertyType mergedContactInfo = ((CIContactPropertyType) strategy.merge(LocatorUtils.property(leftLocator, "contactInfo", lhsContactInfo), LocatorUtils.property(rightLocator, "contactInfo", rhsContactInfo), lhsContactInfo, rhsContactInfo, leftObject.isSetContactInfo(), rightObject.isSetContactInfo())); target.setContactInfo(mergedContactInfo); } else { if (contactInfoShouldBeMergedAndSet == Boolean.FALSE) { target.contactInfo = null; } } } { Boolean roleShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetRole(), rightObject.isSetRole()); if (roleShouldBeMergedAndSet == Boolean.TRUE) { CIRoleCodePropertyType lhsRole; lhsRole = leftObject.getRole(); CIRoleCodePropertyType rhsRole; rhsRole = rightObject.getRole(); CIRoleCodePropertyType mergedRole = ((CIRoleCodePropertyType) strategy.merge(LocatorUtils.property(leftLocator, "role", lhsRole), LocatorUtils.property(rightLocator, "role", rhsRole), lhsRole, rhsRole, leftObject.isSetRole(), rightObject.isSetRole())); target.setRole(mergedRole); } else { if (roleShouldBeMergedAndSet == Boolean.FALSE) { target.role = null; } } } } } }