org.mitre.cybox.objects.WhoisEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stix Show documentation
Show all versions of stix Show documentation
The Java bindings for STIX v.1.2.0.2
The newest version!
/**
* 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 org.mitre.cybox.objects;
import java.io.StringReader;
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.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
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.cybox.common_2.CustomPropertiesType;
import org.mitre.cybox.common_2.DateObjectPropertyType;
import org.mitre.cybox.common_2.DateTimeObjectPropertyType;
import org.mitre.cybox.common_2.ObjectPropertiesType;
import org.mitre.cybox.common_2.RegionalRegistryType;
import org.mitre.cybox.common_2.StringObjectPropertyType;
import org.mitre.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;
import org.xml.sax.SAXException;
/**
* The WhoisObjectType type is intended to characterize Whois information for a domain.
*
* Java class for WhoisObjectType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="WhoisObjectType">
* <complexContent>
* <extension base="{http://cybox.mitre.org/common-2}ObjectPropertiesType">
* <sequence>
* <element name="Lookup_Date" type="{http://cybox.mitre.org/common-2}DateTimeObjectPropertyType" minOccurs="0"/>
* <element name="Domain_Name" type="{http://cybox.mitre.org/objects#URIObject-2}URIObjectType" minOccurs="0"/>
* <element name="Domain_ID" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
* <element name="Server_Name" type="{http://cybox.mitre.org/objects#URIObject-2}URIObjectType" minOccurs="0"/>
* <element name="IP_Address" type="{http://cybox.mitre.org/objects#AddressObject-2}AddressObjectType" minOccurs="0"/>
* <element name="DNSSEC" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisDNSSECTypeEnum" minOccurs="0"/>
* <element name="Nameservers" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisNameserversType" minOccurs="0"/>
* <element name="Status" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisStatusesType" minOccurs="0"/>
* <element name="Updated_Date" type="{http://cybox.mitre.org/common-2}DateObjectPropertyType" minOccurs="0"/>
* <element name="Creation_Date" type="{http://cybox.mitre.org/common-2}DateObjectPropertyType" minOccurs="0"/>
* <element name="Expiration_Date" type="{http://cybox.mitre.org/common-2}DateObjectPropertyType" minOccurs="0"/>
* <element name="Regional_Internet_Registry" type="{http://cybox.mitre.org/common-2}RegionalRegistryType" minOccurs="0"/>
* <element name="Sponsoring_Registrar" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
* <element name="Registrar_Info" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisRegistrarInfoType" minOccurs="0"/>
* <element name="Registrants" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisRegistrantsType" minOccurs="0"/>
* <element name="Contact_Info" type="{http://cybox.mitre.org/objects#WhoisObject-2}WhoisContactType" minOccurs="0"/>
* <element name="Remarks" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WhoisObjectType", namespace = "http://cybox.mitre.org/objects#WhoisObject-2", propOrder = {
"lookupDate", "domainName", "domainID", "serverName", "ipAddress",
"dnssec", "nameservers", "status", "updatedDate", "creationDate",
"expirationDate", "regionalInternetRegistry", "sponsoringRegistrar",
"registrarInfo", "registrants", "contactInfo", "remarks" })
@XmlRootElement(name = "Whois_Entry", namespace = "http://cybox.mitre.org/objects#WhoisObject-2")
public class WhoisEntry extends ObjectPropertiesType implements Equals,
HashCode, ToString {
@XmlElement(name = "Lookup_Date")
protected DateTimeObjectPropertyType lookupDate;
@XmlElement(name = "Domain_Name")
protected URIObjectType domainName;
@XmlElement(name = "Domain_ID")
protected StringObjectPropertyType domainID;
@XmlElement(name = "Server_Name")
protected URIObjectType serverName;
@XmlElement(name = "IP_Address")
protected Address ipAddress;
@XmlElement(name = "DNSSEC")
protected WhoisDNSSECTypeEnum dnssec;
@XmlElement(name = "Nameservers")
protected WhoisNameserversType nameservers;
@XmlElement(name = "Status")
protected WhoisStatusesType status;
@XmlElement(name = "Updated_Date")
protected DateObjectPropertyType updatedDate;
@XmlElement(name = "Creation_Date")
protected DateObjectPropertyType creationDate;
@XmlElement(name = "Expiration_Date")
protected DateObjectPropertyType expirationDate;
@XmlElement(name = "Regional_Internet_Registry")
protected RegionalRegistryType regionalInternetRegistry;
@XmlElement(name = "Sponsoring_Registrar")
protected StringObjectPropertyType sponsoringRegistrar;
@XmlElement(name = "Registrar_Info")
protected WhoisRegistrarInfoType registrarInfo;
@XmlElement(name = "Registrants")
protected WhoisRegistrantsType registrants;
@XmlElement(name = "Contact_Info")
protected WhoisContactType contactInfo;
@XmlElement(name = "Remarks")
protected StringObjectPropertyType remarks;
/**
* Default no-arg constructor
*
*/
public WhoisEntry() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public WhoisEntry(final CustomPropertiesType customProperties,
final QName objectReference,
final DateTimeObjectPropertyType lookupDate,
final URIObjectType domainName,
final StringObjectPropertyType domainID,
final URIObjectType serverName, final Address ipAddress,
final WhoisDNSSECTypeEnum dnssec,
final WhoisNameserversType nameservers,
final WhoisStatusesType status,
final DateObjectPropertyType updatedDate,
final DateObjectPropertyType creationDate,
final DateObjectPropertyType expirationDate,
final RegionalRegistryType regionalInternetRegistry,
final StringObjectPropertyType sponsoringRegistrar,
final WhoisRegistrarInfoType registrarInfo,
final WhoisRegistrantsType registrants,
final WhoisContactType contactInfo,
final StringObjectPropertyType remarks) {
super(customProperties, objectReference);
this.lookupDate = lookupDate;
this.domainName = domainName;
this.domainID = domainID;
this.serverName = serverName;
this.ipAddress = ipAddress;
this.dnssec = dnssec;
this.nameservers = nameservers;
this.status = status;
this.updatedDate = updatedDate;
this.creationDate = creationDate;
this.expirationDate = expirationDate;
this.regionalInternetRegistry = regionalInternetRegistry;
this.sponsoringRegistrar = sponsoringRegistrar;
this.registrarInfo = registrarInfo;
this.registrants = registrants;
this.contactInfo = contactInfo;
this.remarks = remarks;
}
/**
* Gets the value of the lookupDate property.
*
* @return
* possible object is
* {@link DateTimeObjectPropertyType }
*
*/
public DateTimeObjectPropertyType getLookupDate() {
return lookupDate;
}
/**
* Sets the value of the lookupDate property.
*
* @param value
* allowed object is
* {@link DateTimeObjectPropertyType }
*
*/
public void setLookupDate(DateTimeObjectPropertyType value) {
this.lookupDate = value;
}
/**
* Gets the value of the domainName property.
*
* @return
* possible object is
* {@link URIObjectType }
*
*/
public URIObjectType getDomainName() {
return domainName;
}
/**
* Sets the value of the domainName property.
*
* @param value
* allowed object is
* {@link URIObjectType }
*
*/
public void setDomainName(URIObjectType value) {
this.domainName = value;
}
/**
* Gets the value of the domainID property.
*
* @return
* possible object is
* {@link StringObjectPropertyType }
*
*/
public StringObjectPropertyType getDomainID() {
return domainID;
}
/**
* Sets the value of the domainID property.
*
* @param value
* allowed object is
* {@link StringObjectPropertyType }
*
*/
public void setDomainID(StringObjectPropertyType value) {
this.domainID = value;
}
/**
* Gets the value of the serverName property.
*
* @return
* possible object is
* {@link URIObjectType }
*
*/
public URIObjectType getServerName() {
return serverName;
}
/**
* Sets the value of the serverName property.
*
* @param value
* allowed object is
* {@link URIObjectType }
*
*/
public void setServerName(URIObjectType value) {
this.serverName = value;
}
/**
* Gets the value of the ipAddress property.
*
* @return
* possible object is
* {@link Address }
*
*/
public Address getIPAddress() {
return ipAddress;
}
/**
* Sets the value of the ipAddress property.
*
* @param value
* allowed object is
* {@link Address }
*
*/
public void setIPAddress(Address value) {
this.ipAddress = value;
}
/**
* Gets the value of the dnssec property.
*
* @return
* possible object is
* {@link WhoisDNSSECTypeEnum }
*
*/
public WhoisDNSSECTypeEnum getDNSSEC() {
return dnssec;
}
/**
* Sets the value of the dnssec property.
*
* @param value
* allowed object is
* {@link WhoisDNSSECTypeEnum }
*
*/
public void setDNSSEC(WhoisDNSSECTypeEnum value) {
this.dnssec = value;
}
/**
* Gets the value of the nameservers property.
*
* @return
* possible object is
* {@link WhoisNameserversType }
*
*/
public WhoisNameserversType getNameservers() {
return nameservers;
}
/**
* Sets the value of the nameservers property.
*
* @param value
* allowed object is
* {@link WhoisNameserversType }
*
*/
public void setNameservers(WhoisNameserversType value) {
this.nameservers = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link WhoisStatusesType }
*
*/
public WhoisStatusesType getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link WhoisStatusesType }
*
*/
public void setStatus(WhoisStatusesType value) {
this.status = value;
}
/**
* Gets the value of the updatedDate property.
*
* @return
* possible object is
* {@link DateObjectPropertyType }
*
*/
public DateObjectPropertyType getUpdatedDate() {
return updatedDate;
}
/**
* Sets the value of the updatedDate property.
*
* @param value
* allowed object is
* {@link DateObjectPropertyType }
*
*/
public void setUpdatedDate(DateObjectPropertyType value) {
this.updatedDate = value;
}
/**
* Gets the value of the creationDate property.
*
* @return
* possible object is
* {@link DateObjectPropertyType }
*
*/
public DateObjectPropertyType getCreationDate() {
return creationDate;
}
/**
* Sets the value of the creationDate property.
*
* @param value
* allowed object is
* {@link DateObjectPropertyType }
*
*/
public void setCreationDate(DateObjectPropertyType value) {
this.creationDate = value;
}
/**
* Gets the value of the expirationDate property.
*
* @return
* possible object is
* {@link DateObjectPropertyType }
*
*/
public DateObjectPropertyType getExpirationDate() {
return expirationDate;
}
/**
* Sets the value of the expirationDate property.
*
* @param value
* allowed object is
* {@link DateObjectPropertyType }
*
*/
public void setExpirationDate(DateObjectPropertyType value) {
this.expirationDate = value;
}
/**
* Gets the value of the regionalInternetRegistry property.
*
* @return
* possible object is
* {@link RegionalRegistryType }
*
*/
public RegionalRegistryType getRegionalInternetRegistry() {
return regionalInternetRegistry;
}
/**
* Sets the value of the regionalInternetRegistry property.
*
* @param value
* allowed object is
* {@link RegionalRegistryType }
*
*/
public void setRegionalInternetRegistry(RegionalRegistryType value) {
this.regionalInternetRegistry = value;
}
/**
* Gets the value of the sponsoringRegistrar property.
*
* @return
* possible object is
* {@link StringObjectPropertyType }
*
*/
public StringObjectPropertyType getSponsoringRegistrar() {
return sponsoringRegistrar;
}
/**
* Sets the value of the sponsoringRegistrar property.
*
* @param value
* allowed object is
* {@link StringObjectPropertyType }
*
*/
public void setSponsoringRegistrar(StringObjectPropertyType value) {
this.sponsoringRegistrar = value;
}
/**
* Gets the value of the registrarInfo property.
*
* @return
* possible object is
* {@link WhoisRegistrarInfoType }
*
*/
public WhoisRegistrarInfoType getRegistrarInfo() {
return registrarInfo;
}
/**
* Sets the value of the registrarInfo property.
*
* @param value
* allowed object is
* {@link WhoisRegistrarInfoType }
*
*/
public void setRegistrarInfo(WhoisRegistrarInfoType value) {
this.registrarInfo = value;
}
/**
* Gets the value of the registrants property.
*
* @return
* possible object is
* {@link WhoisRegistrantsType }
*
*/
public WhoisRegistrantsType getRegistrants() {
return registrants;
}
/**
* Sets the value of the registrants property.
*
* @param value
* allowed object is
* {@link WhoisRegistrantsType }
*
*/
public void setRegistrants(WhoisRegistrantsType value) {
this.registrants = value;
}
/**
* Gets the value of the contactInfo property.
*
* @return
* possible object is
* {@link WhoisContactType }
*
*/
public WhoisContactType getContactInfo() {
return contactInfo;
}
/**
* Sets the value of the contactInfo property.
*
* @param value
* allowed object is
* {@link WhoisContactType }
*
*/
public void setContactInfo(WhoisContactType value) {
this.contactInfo = value;
}
/**
* Gets the value of the remarks property.
*
* @return
* possible object is
* {@link StringObjectPropertyType }
*
*/
public StringObjectPropertyType getRemarks() {
return remarks;
}
/**
* Sets the value of the remarks property.
*
* @param value
* allowed object is
* {@link StringObjectPropertyType }
*
*/
public void setRemarks(StringObjectPropertyType value) {
this.remarks = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator,
Object object, EqualsStrategy strategy) {
if (!(object instanceof WhoisEntry)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final WhoisEntry that = ((WhoisEntry) object);
{
DateTimeObjectPropertyType lhsLookupDate;
lhsLookupDate = this.getLookupDate();
DateTimeObjectPropertyType rhsLookupDate;
rhsLookupDate = that.getLookupDate();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"lookupDate", lhsLookupDate), LocatorUtils.property(
thatLocator, "lookupDate", rhsLookupDate), lhsLookupDate,
rhsLookupDate)) {
return false;
}
}
{
URIObjectType lhsDomainName;
lhsDomainName = this.getDomainName();
URIObjectType rhsDomainName;
rhsDomainName = that.getDomainName();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"domainName", lhsDomainName), LocatorUtils.property(
thatLocator, "domainName", rhsDomainName), lhsDomainName,
rhsDomainName)) {
return false;
}
}
{
StringObjectPropertyType lhsDomainID;
lhsDomainID = this.getDomainID();
StringObjectPropertyType rhsDomainID;
rhsDomainID = that.getDomainID();
if (!strategy
.equals(LocatorUtils.property(thisLocator, "domainID",
lhsDomainID), LocatorUtils.property(thatLocator,
"domainID", rhsDomainID), lhsDomainID, rhsDomainID)) {
return false;
}
}
{
URIObjectType lhsServerName;
lhsServerName = this.getServerName();
URIObjectType rhsServerName;
rhsServerName = that.getServerName();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"serverName", lhsServerName), LocatorUtils.property(
thatLocator, "serverName", rhsServerName), lhsServerName,
rhsServerName)) {
return false;
}
}
{
Address lhsIPAddress;
lhsIPAddress = this.getIPAddress();
Address rhsIPAddress;
rhsIPAddress = that.getIPAddress();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"ipAddress", lhsIPAddress), LocatorUtils.property(
thatLocator, "ipAddress", rhsIPAddress), lhsIPAddress,
rhsIPAddress)) {
return false;
}
}
{
WhoisDNSSECTypeEnum lhsDNSSEC;
lhsDNSSEC = this.getDNSSEC();
WhoisDNSSECTypeEnum rhsDNSSEC;
rhsDNSSEC = that.getDNSSEC();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "dnssec", lhsDNSSEC),
LocatorUtils.property(thatLocator, "dnssec", rhsDNSSEC),
lhsDNSSEC, rhsDNSSEC)) {
return false;
}
}
{
WhoisNameserversType lhsNameservers;
lhsNameservers = this.getNameservers();
WhoisNameserversType rhsNameservers;
rhsNameservers = that.getNameservers();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"nameservers", lhsNameservers), LocatorUtils.property(
thatLocator, "nameservers", rhsNameservers),
lhsNameservers, rhsNameservers)) {
return false;
}
}
{
WhoisStatusesType lhsStatus;
lhsStatus = this.getStatus();
WhoisStatusesType rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "status", lhsStatus),
LocatorUtils.property(thatLocator, "status", rhsStatus),
lhsStatus, rhsStatus)) {
return false;
}
}
{
DateObjectPropertyType lhsUpdatedDate;
lhsUpdatedDate = this.getUpdatedDate();
DateObjectPropertyType rhsUpdatedDate;
rhsUpdatedDate = that.getUpdatedDate();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"updatedDate", lhsUpdatedDate), LocatorUtils.property(
thatLocator, "updatedDate", rhsUpdatedDate),
lhsUpdatedDate, rhsUpdatedDate)) {
return false;
}
}
{
DateObjectPropertyType lhsCreationDate;
lhsCreationDate = this.getCreationDate();
DateObjectPropertyType rhsCreationDate;
rhsCreationDate = that.getCreationDate();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"creationDate", lhsCreationDate), LocatorUtils.property(
thatLocator, "creationDate", rhsCreationDate),
lhsCreationDate, rhsCreationDate)) {
return false;
}
}
{
DateObjectPropertyType lhsExpirationDate;
lhsExpirationDate = this.getExpirationDate();
DateObjectPropertyType rhsExpirationDate;
rhsExpirationDate = that.getExpirationDate();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"expirationDate", lhsExpirationDate),
LocatorUtils.property(thatLocator, "expirationDate",
rhsExpirationDate), lhsExpirationDate,
rhsExpirationDate)) {
return false;
}
}
{
RegionalRegistryType lhsRegionalInternetRegistry;
lhsRegionalInternetRegistry = this.getRegionalInternetRegistry();
RegionalRegistryType rhsRegionalInternetRegistry;
rhsRegionalInternetRegistry = that.getRegionalInternetRegistry();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"regionalInternetRegistry", lhsRegionalInternetRegistry),
LocatorUtils.property(thatLocator,
"regionalInternetRegistry",
rhsRegionalInternetRegistry),
lhsRegionalInternetRegistry, rhsRegionalInternetRegistry)) {
return false;
}
}
{
StringObjectPropertyType lhsSponsoringRegistrar;
lhsSponsoringRegistrar = this.getSponsoringRegistrar();
StringObjectPropertyType rhsSponsoringRegistrar;
rhsSponsoringRegistrar = that.getSponsoringRegistrar();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"sponsoringRegistrar", lhsSponsoringRegistrar),
LocatorUtils.property(thatLocator, "sponsoringRegistrar",
rhsSponsoringRegistrar), lhsSponsoringRegistrar,
rhsSponsoringRegistrar)) {
return false;
}
}
{
WhoisRegistrarInfoType lhsRegistrarInfo;
lhsRegistrarInfo = this.getRegistrarInfo();
WhoisRegistrarInfoType rhsRegistrarInfo;
rhsRegistrarInfo = that.getRegistrarInfo();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"registrarInfo", lhsRegistrarInfo), LocatorUtils.property(
thatLocator, "registrarInfo", rhsRegistrarInfo),
lhsRegistrarInfo, rhsRegistrarInfo)) {
return false;
}
}
{
WhoisRegistrantsType lhsRegistrants;
lhsRegistrants = this.getRegistrants();
WhoisRegistrantsType rhsRegistrants;
rhsRegistrants = that.getRegistrants();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"registrants", lhsRegistrants), LocatorUtils.property(
thatLocator, "registrants", rhsRegistrants),
lhsRegistrants, rhsRegistrants)) {
return false;
}
}
{
WhoisContactType lhsContactInfo;
lhsContactInfo = this.getContactInfo();
WhoisContactType rhsContactInfo;
rhsContactInfo = that.getContactInfo();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"contactInfo", lhsContactInfo), LocatorUtils.property(
thatLocator, "contactInfo", rhsContactInfo),
lhsContactInfo, rhsContactInfo)) {
return false;
}
}
{
StringObjectPropertyType lhsRemarks;
lhsRemarks = this.getRemarks();
StringObjectPropertyType rhsRemarks;
rhsRemarks = that.getRemarks();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "remarks", lhsRemarks),
LocatorUtils.property(thatLocator, "remarks", rhsRemarks),
lhsRemarks, rhsRemarks)) {
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 = super.hashCode(locator, strategy);
{
DateTimeObjectPropertyType theLookupDate;
theLookupDate = this.getLookupDate();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "lookupDate",
theLookupDate), currentHashCode, theLookupDate);
}
{
URIObjectType theDomainName;
theDomainName = this.getDomainName();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "domainName",
theDomainName), currentHashCode, theDomainName);
}
{
StringObjectPropertyType theDomainID;
theDomainID = this.getDomainID();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "domainID", theDomainID),
currentHashCode, theDomainID);
}
{
URIObjectType theServerName;
theServerName = this.getServerName();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "serverName",
theServerName), currentHashCode, theServerName);
}
{
Address theIPAddress;
theIPAddress = this.getIPAddress();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "ipAddress", theIPAddress),
currentHashCode, theIPAddress);
}
{
WhoisDNSSECTypeEnum theDNSSEC;
theDNSSEC = this.getDNSSEC();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "dnssec", theDNSSEC),
currentHashCode, theDNSSEC);
}
{
WhoisNameserversType theNameservers;
theNameservers = this.getNameservers();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"nameservers", theNameservers), currentHashCode,
theNameservers);
}
{
WhoisStatusesType theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "status", theStatus),
currentHashCode, theStatus);
}
{
DateObjectPropertyType theUpdatedDate;
theUpdatedDate = this.getUpdatedDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"updatedDate", theUpdatedDate), currentHashCode,
theUpdatedDate);
}
{
DateObjectPropertyType theCreationDate;
theCreationDate = this.getCreationDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"creationDate", theCreationDate), currentHashCode,
theCreationDate);
}
{
DateObjectPropertyType theExpirationDate;
theExpirationDate = this.getExpirationDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"expirationDate", theExpirationDate), currentHashCode,
theExpirationDate);
}
{
RegionalRegistryType theRegionalInternetRegistry;
theRegionalInternetRegistry = this.getRegionalInternetRegistry();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"regionalInternetRegistry", theRegionalInternetRegistry),
currentHashCode, theRegionalInternetRegistry);
}
{
StringObjectPropertyType theSponsoringRegistrar;
theSponsoringRegistrar = this.getSponsoringRegistrar();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"sponsoringRegistrar", theSponsoringRegistrar),
currentHashCode, theSponsoringRegistrar);
}
{
WhoisRegistrarInfoType theRegistrarInfo;
theRegistrarInfo = this.getRegistrarInfo();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"registrarInfo", theRegistrarInfo), currentHashCode,
theRegistrarInfo);
}
{
WhoisRegistrantsType theRegistrants;
theRegistrants = this.getRegistrants();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"registrants", theRegistrants), currentHashCode,
theRegistrants);
}
{
WhoisContactType theContactInfo;
theContactInfo = this.getContactInfo();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"contactInfo", theContactInfo), currentHashCode,
theContactInfo);
}
{
StringObjectPropertyType theRemarks;
theRemarks = this.getRemarks();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "remarks", theRemarks),
currentHashCode, theRemarks);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public WhoisEntry withLookupDate(DateTimeObjectPropertyType value) {
setLookupDate(value);
return this;
}
public WhoisEntry withDomainName(URIObjectType value) {
setDomainName(value);
return this;
}
public WhoisEntry withDomainID(StringObjectPropertyType value) {
setDomainID(value);
return this;
}
public WhoisEntry withServerName(URIObjectType value) {
setServerName(value);
return this;
}
public WhoisEntry withIPAddress(Address value) {
setIPAddress(value);
return this;
}
public WhoisEntry withDNSSEC(WhoisDNSSECTypeEnum value) {
setDNSSEC(value);
return this;
}
public WhoisEntry withNameservers(WhoisNameserversType value) {
setNameservers(value);
return this;
}
public WhoisEntry withStatus(WhoisStatusesType value) {
setStatus(value);
return this;
}
public WhoisEntry withUpdatedDate(DateObjectPropertyType value) {
setUpdatedDate(value);
return this;
}
public WhoisEntry withCreationDate(DateObjectPropertyType value) {
setCreationDate(value);
return this;
}
public WhoisEntry withExpirationDate(DateObjectPropertyType value) {
setExpirationDate(value);
return this;
}
public WhoisEntry withRegionalInternetRegistry(RegionalRegistryType value) {
setRegionalInternetRegistry(value);
return this;
}
public WhoisEntry withSponsoringRegistrar(StringObjectPropertyType value) {
setSponsoringRegistrar(value);
return this;
}
public WhoisEntry withRegistrarInfo(WhoisRegistrarInfoType value) {
setRegistrarInfo(value);
return this;
}
public WhoisEntry withRegistrants(WhoisRegistrantsType value) {
setRegistrants(value);
return this;
}
public WhoisEntry withContactInfo(WhoisContactType value) {
setContactInfo(value);
return this;
}
public WhoisEntry withRemarks(StringObjectPropertyType value) {
setRemarks(value);
return this;
}
@Override
public WhoisEntry withCustomProperties(CustomPropertiesType value) {
setCustomProperties(value);
return this;
}
@Override
public WhoisEntry withObjectReference(QName value) {
setObjectReference(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) {
super.appendFields(locator, buffer, strategy);
{
DateTimeObjectPropertyType theLookupDate;
theLookupDate = this.getLookupDate();
strategy.appendField(locator, this, "lookupDate", buffer,
theLookupDate);
}
{
URIObjectType theDomainName;
theDomainName = this.getDomainName();
strategy.appendField(locator, this, "domainName", buffer,
theDomainName);
}
{
StringObjectPropertyType theDomainID;
theDomainID = this.getDomainID();
strategy.appendField(locator, this, "domainID", buffer, theDomainID);
}
{
URIObjectType theServerName;
theServerName = this.getServerName();
strategy.appendField(locator, this, "serverName", buffer,
theServerName);
}
{
Address theIPAddress;
theIPAddress = this.getIPAddress();
strategy.appendField(locator, this, "ipAddress", buffer,
theIPAddress);
}
{
WhoisDNSSECTypeEnum theDNSSEC;
theDNSSEC = this.getDNSSEC();
strategy.appendField(locator, this, "dnssec", buffer, theDNSSEC);
}
{
WhoisNameserversType theNameservers;
theNameservers = this.getNameservers();
strategy.appendField(locator, this, "nameservers", buffer,
theNameservers);
}
{
WhoisStatusesType theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
{
DateObjectPropertyType theUpdatedDate;
theUpdatedDate = this.getUpdatedDate();
strategy.appendField(locator, this, "updatedDate", buffer,
theUpdatedDate);
}
{
DateObjectPropertyType theCreationDate;
theCreationDate = this.getCreationDate();
strategy.appendField(locator, this, "creationDate", buffer,
theCreationDate);
}
{
DateObjectPropertyType theExpirationDate;
theExpirationDate = this.getExpirationDate();
strategy.appendField(locator, this, "expirationDate", buffer,
theExpirationDate);
}
{
RegionalRegistryType theRegionalInternetRegistry;
theRegionalInternetRegistry = this.getRegionalInternetRegistry();
strategy.appendField(locator, this, "regionalInternetRegistry",
buffer, theRegionalInternetRegistry);
}
{
StringObjectPropertyType theSponsoringRegistrar;
theSponsoringRegistrar = this.getSponsoringRegistrar();
strategy.appendField(locator, this, "sponsoringRegistrar", buffer,
theSponsoringRegistrar);
}
{
WhoisRegistrarInfoType theRegistrarInfo;
theRegistrarInfo = this.getRegistrarInfo();
strategy.appendField(locator, this, "registrarInfo", buffer,
theRegistrarInfo);
}
{
WhoisRegistrantsType theRegistrants;
theRegistrants = this.getRegistrants();
strategy.appendField(locator, this, "registrants", buffer,
theRegistrants);
}
{
WhoisContactType theContactInfo;
theContactInfo = this.getContactInfo();
strategy.appendField(locator, this, "contactInfo", buffer,
theContactInfo);
}
{
StringObjectPropertyType theRemarks;
theRemarks = this.getRemarks();
strategy.appendField(locator, this, "remarks", buffer, theRemarks);
}
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, WhoisEntry.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 WhoisEntry instance for XML String
*
* @param text
* XML String for the document
* @return The WhoisEntry instance for the passed XML String
*/
public static WhoisEntry fromXMLString(String text) {
JAXBContext jaxbContext;
try {
jaxbContext = JAXBContext.newInstance(WhoisEntry.class.getPackage()
.getName());
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(STIXSchema.getInstance().getSchema());
unmarshaller.setEventHandler(new ValidationEventHandler());
StreamSource streamSource = new StreamSource(new StringReader(text));
return (WhoisEntry) unmarshaller.unmarshal(streamSource);
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}
/**
* Validates the XML representation of this WhoisEntry 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());
}
}