oasis.names.tc.ciq.xpil._3.Relationships Maven / Gradle / Ivy
Show all versions of stix Show documentation
/**
* Copyright (c) 2015, The MITRE Corporation. All rights reserved.
* See LICENSE for complete terms.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.07.01 at 03:19:53 PM EDT
//
package oasis.names.tc.ciq.xpil._3;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
import oasis.names.tc.ciq.ct._3.DataQualityTypeList;
import oasis.names.tc.ciq.xnl._3.NameLine;
import oasis.names.tc.ciq.xnl._3.OrganisationNameType;
import oasis.names.tc.ciq.xnl._3.PersonNameType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.mitre.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;
import org.xml.sax.SAXException;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Relationship" maxOccurs="unbounded" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}NameLine" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}PersonName" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}OrganisationName" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}Addresses" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}ContactNumbers" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}ElectronicAddressIdentifiers" minOccurs="0"/>
* </sequence>
* <attGroup ref="{urn:oasis:names:tc:ciq:ct:3}grDataQuality"/>
* <attribute name="Status" type="{urn:oasis:names:tc:ciq:ct:3}StatusList" />
* <attribute name="PartyType" type="{urn:oasis:names:tc:ciq:xpil:3}PartyTypeList" />
* <attribute name="RelationshipWithPerson" type="{urn:oasis:names:tc:ciq:xpil:3}PersonRelationshipTypeList" />
* <attribute name="RelationshipWithOrganisation" type="{urn:oasis:names:tc:ciq:xpil:3}OrganisationRelationshipTypeList" />
* <attribute name="RelationshipValidFrom" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* <attribute name="RelationshipValidTo" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* <anyAttribute processContents='lax' namespace='##other'/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <anyAttribute processContents='lax' namespace='##other'/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "relationships" })
@XmlRootElement(name = "Relationships")
public class Relationships implements Equals, HashCode, ToString {
@XmlElement(name = "Relationship")
protected List relationships;
@XmlAnyAttribute
private Map otherAttributes = new HashMap();
/**
* Default no-arg constructor
*
*/
public Relationships() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Relationships(final List relationships,
final Map otherAttributes) {
this.relationships = relationships;
this.otherAttributes = otherAttributes;
}
/**
* Gets the value of the relationships property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the relationships property.
*
*
* For example, to add a new item, do as follows:
*
* getRelationships().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Relationships.Relationship }
*
*
*/
public List getRelationships() {
if (relationships == null) {
relationships = new ArrayList();
}
return this.relationships;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
*
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map getOtherAttributes() {
return otherAttributes;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator,
Object object, EqualsStrategy strategy) {
if (!(object instanceof Relationships)) {
return false;
}
if (this == object) {
return true;
}
final Relationships that = ((Relationships) object);
{
List lhsRelationships;
lhsRelationships = (((this.relationships != null) && (!this.relationships
.isEmpty())) ? this.getRelationships() : null);
List rhsRelationships;
rhsRelationships = (((that.relationships != null) && (!that.relationships
.isEmpty())) ? that.getRelationships() : null);
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationships", lhsRelationships), LocatorUtils.property(
thatLocator, "relationships", rhsRelationships),
lhsRelationships, rhsRelationships)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
List theRelationships;
theRelationships = (((this.relationships != null) && (!this.relationships
.isEmpty())) ? this.getRelationships() : null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"relationships", theRelationships), currentHashCode,
theRelationships);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Relationships withRelationships(Relationships.Relationship... values) {
if (values != null) {
for (Relationships.Relationship value : values) {
getRelationships().add(value);
}
}
return this;
}
public Relationships withRelationships(
Collection values) {
if (values != null) {
getRelationships().addAll(values);
}
return this;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer,
ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator,
StringBuilder buffer, ToStringStrategy strategy) {
{
List theRelationships;
theRelationships = (((this.relationships != null) && (!this.relationships
.isEmpty())) ? this.getRelationships() : null);
strategy.appendField(locator, this, "relationships", buffer,
theRelationships);
}
return buffer;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}NameLine" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}PersonName" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xnl:3}OrganisationName" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}Addresses" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}ContactNumbers" minOccurs="0"/>
* <element ref="{urn:oasis:names:tc:ciq:xpil:3}ElectronicAddressIdentifiers" minOccurs="0"/>
* </sequence>
* <attGroup ref="{urn:oasis:names:tc:ciq:ct:3}grDataQuality"/>
* <attribute name="Status" type="{urn:oasis:names:tc:ciq:ct:3}StatusList" />
* <attribute name="PartyType" type="{urn:oasis:names:tc:ciq:xpil:3}PartyTypeList" />
* <attribute name="RelationshipWithPerson" type="{urn:oasis:names:tc:ciq:xpil:3}PersonRelationshipTypeList" />
* <attribute name="RelationshipWithOrganisation" type="{urn:oasis:names:tc:ciq:xpil:3}OrganisationRelationshipTypeList" />
* <attribute name="RelationshipValidFrom" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* <attribute name="RelationshipValidTo" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* <anyAttribute processContents='lax' namespace='##other'/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "nameLine", "personName",
"organisationName", "addresses", "contactNumbers",
"electronicAddressIdentifiers" })
public static class Relationship implements Equals, HashCode, ToString {
@XmlElement(name = "NameLine", namespace = "urn:oasis:names:tc:ciq:xnl:3")
protected NameLine nameLine;
@XmlElement(name = "PersonName", namespace = "urn:oasis:names:tc:ciq:xnl:3")
protected PersonNameType personName;
@XmlElement(name = "OrganisationName", namespace = "urn:oasis:names:tc:ciq:xnl:3")
protected OrganisationNameType organisationName;
@XmlElement(name = "Addresses")
protected Addresses addresses;
@XmlElement(name = "ContactNumbers")
protected ContactNumbers contactNumbers;
@XmlElement(name = "ElectronicAddressIdentifiers")
protected ElectronicAddressIdentifiers electronicAddressIdentifiers;
@XmlAttribute(name = "Status", namespace = "urn:oasis:names:tc:ciq:xpil:3")
protected String status;
@XmlAttribute(name = "PartyType", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String partyType;
@XmlAttribute(name = "RelationshipWithPerson", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String relationshipWithPerson;
@XmlAttribute(name = "RelationshipWithOrganisation", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String relationshipWithOrganisation;
@XmlAttribute(name = "RelationshipValidFrom", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar relationshipValidFrom;
@XmlAttribute(name = "RelationshipValidTo", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar relationshipValidTo;
@XmlAttribute(name = "DataQualityType", namespace = "urn:oasis:names:tc:ciq:ct:3")
protected DataQualityTypeList dataQualityType;
@XmlAttribute(name = "ValidFrom", namespace = "urn:oasis:names:tc:ciq:ct:3")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar validFrom;
@XmlAttribute(name = "ValidTo", namespace = "urn:oasis:names:tc:ciq:ct:3")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar validTo;
@XmlAnyAttribute
private Map otherAttributes = new HashMap();
/**
* Default no-arg constructor
*
*/
public Relationship() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Relationship(
final NameLine nameLine,
final PersonNameType personName,
final OrganisationNameType organisationName,
final Addresses addresses,
final ContactNumbers contactNumbers,
final ElectronicAddressIdentifiers electronicAddressIdentifiers,
final String status, final String partyType,
final String relationshipWithPerson,
final String relationshipWithOrganisation,
final XMLGregorianCalendar relationshipValidFrom,
final XMLGregorianCalendar relationshipValidTo,
final DataQualityTypeList dataQualityType,
final XMLGregorianCalendar validFrom,
final XMLGregorianCalendar validTo,
final Map otherAttributes) {
this.nameLine = nameLine;
this.personName = personName;
this.organisationName = organisationName;
this.addresses = addresses;
this.contactNumbers = contactNumbers;
this.electronicAddressIdentifiers = electronicAddressIdentifiers;
this.status = status;
this.partyType = partyType;
this.relationshipWithPerson = relationshipWithPerson;
this.relationshipWithOrganisation = relationshipWithOrganisation;
this.relationshipValidFrom = relationshipValidFrom;
this.relationshipValidTo = relationshipValidTo;
this.dataQualityType = dataQualityType;
this.validFrom = validFrom;
this.validTo = validTo;
this.otherAttributes = otherAttributes;
}
/**
* Gets the value of the nameLine property.
*
* @return
* possible object is
* {@link NameLine }
*
*/
public NameLine getNameLine() {
return nameLine;
}
/**
* Sets the value of the nameLine property.
*
* @param value
* allowed object is
* {@link NameLine }
*
*/
public void setNameLine(NameLine value) {
this.nameLine = value;
}
/**
* Gets the value of the personName property.
*
* @return
* possible object is
* {@link PersonNameType }
*
*/
public PersonNameType getPersonName() {
return personName;
}
/**
* Sets the value of the personName property.
*
* @param value
* allowed object is
* {@link PersonNameType }
*
*/
public void setPersonName(PersonNameType value) {
this.personName = value;
}
/**
* Gets the value of the organisationName property.
*
* @return
* possible object is
* {@link OrganisationNameType }
*
*/
public OrganisationNameType getOrganisationName() {
return organisationName;
}
/**
* Sets the value of the organisationName property.
*
* @param value
* allowed object is
* {@link OrganisationNameType }
*
*/
public void setOrganisationName(OrganisationNameType value) {
this.organisationName = value;
}
/**
* Gets the value of the addresses property.
*
* @return
* possible object is
* {@link Addresses }
*
*/
public Addresses getAddresses() {
return addresses;
}
/**
* Sets the value of the addresses property.
*
* @param value
* allowed object is
* {@link Addresses }
*
*/
public void setAddresses(Addresses value) {
this.addresses = value;
}
/**
* Gets the value of the contactNumbers property.
*
* @return
* possible object is
* {@link ContactNumbers }
*
*/
public ContactNumbers getContactNumbers() {
return contactNumbers;
}
/**
* Sets the value of the contactNumbers property.
*
* @param value
* allowed object is
* {@link ContactNumbers }
*
*/
public void setContactNumbers(ContactNumbers value) {
this.contactNumbers = value;
}
/**
* Gets the value of the electronicAddressIdentifiers property.
*
* @return
* possible object is
* {@link ElectronicAddressIdentifiers }
*
*/
public ElectronicAddressIdentifiers getElectronicAddressIdentifiers() {
return electronicAddressIdentifiers;
}
/**
* Sets the value of the electronicAddressIdentifiers property.
*
* @param value
* allowed object is
* {@link ElectronicAddressIdentifiers }
*
*/
public void setElectronicAddressIdentifiers(
ElectronicAddressIdentifiers value) {
this.electronicAddressIdentifiers = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
/**
* Gets the value of the partyType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPartyType() {
return partyType;
}
/**
* Sets the value of the partyType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPartyType(String value) {
this.partyType = value;
}
/**
* Gets the value of the relationshipWithPerson property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRelationshipWithPerson() {
return relationshipWithPerson;
}
/**
* Sets the value of the relationshipWithPerson property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRelationshipWithPerson(String value) {
this.relationshipWithPerson = value;
}
/**
* Gets the value of the relationshipWithOrganisation property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRelationshipWithOrganisation() {
return relationshipWithOrganisation;
}
/**
* Sets the value of the relationshipWithOrganisation property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRelationshipWithOrganisation(String value) {
this.relationshipWithOrganisation = value;
}
/**
* Gets the value of the relationshipValidFrom property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getRelationshipValidFrom() {
return relationshipValidFrom;
}
/**
* Sets the value of the relationshipValidFrom property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setRelationshipValidFrom(XMLGregorianCalendar value) {
this.relationshipValidFrom = value;
}
/**
* Gets the value of the relationshipValidTo property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getRelationshipValidTo() {
return relationshipValidTo;
}
/**
* Sets the value of the relationshipValidTo property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setRelationshipValidTo(XMLGregorianCalendar value) {
this.relationshipValidTo = value;
}
/**
* Gets the value of the dataQualityType property.
*
* @return
* possible object is
* {@link DataQualityTypeList }
*
*/
public DataQualityTypeList getDataQualityType() {
return dataQualityType;
}
/**
* Sets the value of the dataQualityType property.
*
* @param value
* allowed object is
* {@link DataQualityTypeList }
*
*/
public void setDataQualityType(DataQualityTypeList value) {
this.dataQualityType = value;
}
/**
* Gets the value of the validFrom property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getValidFrom() {
return validFrom;
}
/**
* Sets the value of the validFrom property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setValidFrom(XMLGregorianCalendar value) {
this.validFrom = value;
}
/**
* Gets the value of the validTo property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getValidTo() {
return validTo;
}
/**
* Sets the value of the validTo property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setValidTo(XMLGregorianCalendar value) {
this.validTo = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
*
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map getOtherAttributes() {
return otherAttributes;
}
public boolean equals(ObjectLocator thisLocator,
ObjectLocator thatLocator, Object object,
EqualsStrategy strategy) {
if (!(object instanceof Relationships.Relationship)) {
return false;
}
if (this == object) {
return true;
}
final Relationships.Relationship that = ((Relationships.Relationship) object);
{
NameLine lhsNameLine;
lhsNameLine = this.getNameLine();
NameLine rhsNameLine;
rhsNameLine = that.getNameLine();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"nameLine", lhsNameLine), LocatorUtils.property(
thatLocator, "nameLine", rhsNameLine), lhsNameLine,
rhsNameLine)) {
return false;
}
}
{
PersonNameType lhsPersonName;
lhsPersonName = this.getPersonName();
PersonNameType rhsPersonName;
rhsPersonName = that.getPersonName();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"personName", lhsPersonName), LocatorUtils.property(
thatLocator, "personName", rhsPersonName),
lhsPersonName, rhsPersonName)) {
return false;
}
}
{
OrganisationNameType lhsOrganisationName;
lhsOrganisationName = this.getOrganisationName();
OrganisationNameType rhsOrganisationName;
rhsOrganisationName = that.getOrganisationName();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"organisationName", lhsOrganisationName), LocatorUtils
.property(thatLocator, "organisationName",
rhsOrganisationName), lhsOrganisationName,
rhsOrganisationName)) {
return false;
}
}
{
Addresses lhsAddresses;
lhsAddresses = this.getAddresses();
Addresses rhsAddresses;
rhsAddresses = that.getAddresses();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"addresses", lhsAddresses), LocatorUtils.property(
thatLocator, "addresses", rhsAddresses), lhsAddresses,
rhsAddresses)) {
return false;
}
}
{
ContactNumbers lhsContactNumbers;
lhsContactNumbers = this.getContactNumbers();
ContactNumbers rhsContactNumbers;
rhsContactNumbers = that.getContactNumbers();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"contactNumbers", lhsContactNumbers), LocatorUtils
.property(thatLocator, "contactNumbers",
rhsContactNumbers), lhsContactNumbers,
rhsContactNumbers)) {
return false;
}
}
{
ElectronicAddressIdentifiers lhsElectronicAddressIdentifiers;
lhsElectronicAddressIdentifiers = this
.getElectronicAddressIdentifiers();
ElectronicAddressIdentifiers rhsElectronicAddressIdentifiers;
rhsElectronicAddressIdentifiers = that
.getElectronicAddressIdentifiers();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"electronicAddressIdentifiers",
lhsElectronicAddressIdentifiers), LocatorUtils
.property(thatLocator, "electronicAddressIdentifiers",
rhsElectronicAddressIdentifiers),
lhsElectronicAddressIdentifiers,
rhsElectronicAddressIdentifiers)) {
return false;
}
}
{
String lhsStatus;
lhsStatus = this.getStatus();
String rhsStatus;
rhsStatus = that.getStatus();
if (!strategy
.equals(LocatorUtils.property(thisLocator, "status",
lhsStatus), LocatorUtils.property(thatLocator,
"status", rhsStatus), lhsStatus, rhsStatus)) {
return false;
}
}
{
String lhsPartyType;
lhsPartyType = this.getPartyType();
String rhsPartyType;
rhsPartyType = that.getPartyType();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"partyType", lhsPartyType), LocatorUtils.property(
thatLocator, "partyType", rhsPartyType), lhsPartyType,
rhsPartyType)) {
return false;
}
}
{
String lhsRelationshipWithPerson;
lhsRelationshipWithPerson = this.getRelationshipWithPerson();
String rhsRelationshipWithPerson;
rhsRelationshipWithPerson = that.getRelationshipWithPerson();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationshipWithPerson", lhsRelationshipWithPerson),
LocatorUtils.property(thatLocator,
"relationshipWithPerson",
rhsRelationshipWithPerson),
lhsRelationshipWithPerson, rhsRelationshipWithPerson)) {
return false;
}
}
{
String lhsRelationshipWithOrganisation;
lhsRelationshipWithOrganisation = this
.getRelationshipWithOrganisation();
String rhsRelationshipWithOrganisation;
rhsRelationshipWithOrganisation = that
.getRelationshipWithOrganisation();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationshipWithOrganisation",
lhsRelationshipWithOrganisation), LocatorUtils
.property(thatLocator, "relationshipWithOrganisation",
rhsRelationshipWithOrganisation),
lhsRelationshipWithOrganisation,
rhsRelationshipWithOrganisation)) {
return false;
}
}
{
XMLGregorianCalendar lhsRelationshipValidFrom;
lhsRelationshipValidFrom = this.getRelationshipValidFrom();
XMLGregorianCalendar rhsRelationshipValidFrom;
rhsRelationshipValidFrom = that.getRelationshipValidFrom();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationshipValidFrom", lhsRelationshipValidFrom),
LocatorUtils.property(thatLocator,
"relationshipValidFrom",
rhsRelationshipValidFrom),
lhsRelationshipValidFrom, rhsRelationshipValidFrom)) {
return false;
}
}
{
XMLGregorianCalendar lhsRelationshipValidTo;
lhsRelationshipValidTo = this.getRelationshipValidTo();
XMLGregorianCalendar rhsRelationshipValidTo;
rhsRelationshipValidTo = that.getRelationshipValidTo();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationshipValidTo", lhsRelationshipValidTo),
LocatorUtils.property(thatLocator,
"relationshipValidTo", rhsRelationshipValidTo),
lhsRelationshipValidTo, rhsRelationshipValidTo)) {
return false;
}
}
{
DataQualityTypeList lhsDataQualityType;
lhsDataQualityType = this.getDataQualityType();
DataQualityTypeList rhsDataQualityType;
rhsDataQualityType = that.getDataQualityType();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"dataQualityType", lhsDataQualityType), LocatorUtils
.property(thatLocator, "dataQualityType",
rhsDataQualityType), lhsDataQualityType,
rhsDataQualityType)) {
return false;
}
}
{
XMLGregorianCalendar lhsValidFrom;
lhsValidFrom = this.getValidFrom();
XMLGregorianCalendar rhsValidFrom;
rhsValidFrom = that.getValidFrom();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"validFrom", lhsValidFrom), LocatorUtils.property(
thatLocator, "validFrom", rhsValidFrom), lhsValidFrom,
rhsValidFrom)) {
return false;
}
}
{
XMLGregorianCalendar lhsValidTo;
lhsValidTo = this.getValidTo();
XMLGregorianCalendar rhsValidTo;
rhsValidTo = that.getValidTo();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"validTo", lhsValidTo), LocatorUtils.property(
thatLocator, "validTo", rhsValidTo), lhsValidTo,
rhsValidTo)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
NameLine theNameLine;
theNameLine = this.getNameLine();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "nameLine",
theNameLine), currentHashCode, theNameLine);
}
{
PersonNameType thePersonName;
thePersonName = this.getPersonName();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "personName", thePersonName), currentHashCode,
thePersonName);
}
{
OrganisationNameType theOrganisationName;
theOrganisationName = this.getOrganisationName();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "organisationName", theOrganisationName),
currentHashCode, theOrganisationName);
}
{
Addresses theAddresses;
theAddresses = this.getAddresses();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "addresses", theAddresses), currentHashCode,
theAddresses);
}
{
ContactNumbers theContactNumbers;
theContactNumbers = this.getContactNumbers();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "contactNumbers", theContactNumbers),
currentHashCode, theContactNumbers);
}
{
ElectronicAddressIdentifiers theElectronicAddressIdentifiers;
theElectronicAddressIdentifiers = this
.getElectronicAddressIdentifiers();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "electronicAddressIdentifiers",
theElectronicAddressIdentifiers), currentHashCode,
theElectronicAddressIdentifiers);
}
{
String theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "status", theStatus),
currentHashCode, theStatus);
}
{
String thePartyType;
thePartyType = this.getPartyType();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "partyType", thePartyType), currentHashCode,
thePartyType);
}
{
String theRelationshipWithPerson;
theRelationshipWithPerson = this.getRelationshipWithPerson();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "relationshipWithPerson",
theRelationshipWithPerson), currentHashCode,
theRelationshipWithPerson);
}
{
String theRelationshipWithOrganisation;
theRelationshipWithOrganisation = this
.getRelationshipWithOrganisation();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "relationshipWithOrganisation",
theRelationshipWithOrganisation), currentHashCode,
theRelationshipWithOrganisation);
}
{
XMLGregorianCalendar theRelationshipValidFrom;
theRelationshipValidFrom = this.getRelationshipValidFrom();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "relationshipValidFrom",
theRelationshipValidFrom), currentHashCode,
theRelationshipValidFrom);
}
{
XMLGregorianCalendar theRelationshipValidTo;
theRelationshipValidTo = this.getRelationshipValidTo();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "relationshipValidTo",
theRelationshipValidTo), currentHashCode,
theRelationshipValidTo);
}
{
DataQualityTypeList theDataQualityType;
theDataQualityType = this.getDataQualityType();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "dataQualityType", theDataQualityType),
currentHashCode, theDataQualityType);
}
{
XMLGregorianCalendar theValidFrom;
theValidFrom = this.getValidFrom();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "validFrom", theValidFrom), currentHashCode,
theValidFrom);
}
{
XMLGregorianCalendar theValidTo;
theValidTo = this.getValidTo();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "validTo", theValidTo),
currentHashCode, theValidTo);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Relationships.Relationship withNameLine(NameLine value) {
setNameLine(value);
return this;
}
public Relationships.Relationship withPersonName(PersonNameType value) {
setPersonName(value);
return this;
}
public Relationships.Relationship withOrganisationName(
OrganisationNameType value) {
setOrganisationName(value);
return this;
}
public Relationships.Relationship withAddresses(Addresses value) {
setAddresses(value);
return this;
}
public Relationships.Relationship withContactNumbers(
ContactNumbers value) {
setContactNumbers(value);
return this;
}
public Relationships.Relationship withElectronicAddressIdentifiers(
ElectronicAddressIdentifiers value) {
setElectronicAddressIdentifiers(value);
return this;
}
public Relationships.Relationship withStatus(String value) {
setStatus(value);
return this;
}
public Relationships.Relationship withPartyType(String value) {
setPartyType(value);
return this;
}
public Relationships.Relationship withRelationshipWithPerson(
String value) {
setRelationshipWithPerson(value);
return this;
}
public Relationships.Relationship withRelationshipWithOrganisation(
String value) {
setRelationshipWithOrganisation(value);
return this;
}
public Relationships.Relationship withRelationshipValidFrom(
XMLGregorianCalendar value) {
setRelationshipValidFrom(value);
return this;
}
public Relationships.Relationship withRelationshipValidTo(
XMLGregorianCalendar value) {
setRelationshipValidTo(value);
return this;
}
public Relationships.Relationship withDataQualityType(
DataQualityTypeList value) {
setDataQualityType(value);
return this;
}
public Relationships.Relationship withValidFrom(
XMLGregorianCalendar value) {
setValidFrom(value);
return this;
}
public Relationships.Relationship withValidTo(XMLGregorianCalendar value) {
setValidTo(value);
return this;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator,
StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator,
StringBuilder buffer, ToStringStrategy strategy) {
{
NameLine theNameLine;
theNameLine = this.getNameLine();
strategy.appendField(locator, this, "nameLine", buffer,
theNameLine);
}
{
PersonNameType thePersonName;
thePersonName = this.getPersonName();
strategy.appendField(locator, this, "personName", buffer,
thePersonName);
}
{
OrganisationNameType theOrganisationName;
theOrganisationName = this.getOrganisationName();
strategy.appendField(locator, this, "organisationName", buffer,
theOrganisationName);
}
{
Addresses theAddresses;
theAddresses = this.getAddresses();
strategy.appendField(locator, this, "addresses", buffer,
theAddresses);
}
{
ContactNumbers theContactNumbers;
theContactNumbers = this.getContactNumbers();
strategy.appendField(locator, this, "contactNumbers", buffer,
theContactNumbers);
}
{
ElectronicAddressIdentifiers theElectronicAddressIdentifiers;
theElectronicAddressIdentifiers = this
.getElectronicAddressIdentifiers();
strategy.appendField(locator, this,
"electronicAddressIdentifiers", buffer,
theElectronicAddressIdentifiers);
}
{
String theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
{
String thePartyType;
thePartyType = this.getPartyType();
strategy.appendField(locator, this, "partyType", buffer,
thePartyType);
}
{
String theRelationshipWithPerson;
theRelationshipWithPerson = this.getRelationshipWithPerson();
strategy.appendField(locator, this, "relationshipWithPerson",
buffer, theRelationshipWithPerson);
}
{
String theRelationshipWithOrganisation;
theRelationshipWithOrganisation = this
.getRelationshipWithOrganisation();
strategy.appendField(locator, this,
"relationshipWithOrganisation", buffer,
theRelationshipWithOrganisation);
}
{
XMLGregorianCalendar theRelationshipValidFrom;
theRelationshipValidFrom = this.getRelationshipValidFrom();
strategy.appendField(locator, this, "relationshipValidFrom",
buffer, theRelationshipValidFrom);
}
{
XMLGregorianCalendar theRelationshipValidTo;
theRelationshipValidTo = this.getRelationshipValidTo();
strategy.appendField(locator, this, "relationshipValidTo",
buffer, theRelationshipValidTo);
}
{
DataQualityTypeList theDataQualityType;
theDataQualityType = this.getDataQualityType();
strategy.appendField(locator, this, "dataQualityType", buffer,
theDataQualityType);
}
{
XMLGregorianCalendar theValidFrom;
theValidFrom = this.getValidFrom();
strategy.appendField(locator, this, "validFrom", buffer,
theValidFrom);
}
{
XMLGregorianCalendar theValidTo;
theValidTo = this.getValidTo();
strategy.appendField(locator, this, "validTo", buffer,
theValidTo);
}
return buffer;
}
}
/**
* Returns A Document representation of this instance that is not formatted.
*
* @return The Document representation for this instance.
*/
public org.w3c.dom.Document toDocument() {
return toDocument(false);
}
/**
* Returns A Document representation for this instance.
*
* @param prettyPrint
* True for pretty print, otherwise false
*
* @return The Document representation for this instance.
*/
public org.w3c.dom.Document toDocument(boolean prettyPrint) {
return DocumentUtilities.toDocument(toJAXBElement(), prettyPrint);
}
/**
* Returns JAXBElement for this instance.
*
* @return The JAXBElement for this instance.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public JAXBElement> toJAXBElement() {
QName qualifiedName = STIXSchema.getQualifiedName(this);
return new JAXBElement(qualifiedName, Relationships.class, this);
}
/**
* Returns String representation of this instance that is not formatted.
*
* @return The String containing the XML mark-up.
*/
public String toXMLString() {
return toXMLString(false);
}
/**
* Returns XML String for JAXB Document Object Model object.
*
* @param prettyPrint
* True for pretty print, otherwise false
*
* @return The String containing the XML mark-up.
*/
public String toXMLString(boolean prettyPrint) {
return DocumentUtilities.toXMLString(toDocument(), prettyPrint);
}
/**
* Creates Relationships instance for XML String
*
* @param text
* XML String for the document
* @return The Relationships instance for the passed XML String
*/
public static Relationships fromXMLString(String text) {
JAXBContext jaxbContext;
try {
jaxbContext = JAXBContext.newInstance(Relationships.class
.getPackage().getName());
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(STIXSchema.getInstance().getSchema());
unmarshaller.setEventHandler(new ValidationEventHandler());
StreamSource streamSource = new StreamSource(new StringReader(text));
return (Relationships) unmarshaller.unmarshal(streamSource);
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}
/**
* Validates the XML representation of this Relationships instance
* Returning true indicating a successful validation, false if not.
*
* @return boolean True If it validates against the schema
* @throws SAXException
* If the a validation ErrorHandler has not been set, and
* validation throws a SAXException
*/
public boolean validate() throws SAXException {
return STIXSchema.getInstance().validate(toXMLString());
}
}