
oasis.names.tc.ciq.xpil._3.OrganisationInfo 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:30:29 PM EDT
//
package oasis.names.tc.ciq.xpil._3;
import java.io.StringReader;
import java.util.HashMap;
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.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 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">
* <attGroup ref="{urn:oasis:names:tc:ciq:ct:3}grDataQuality"/>
* <attribute name="Type" type="{urn:oasis:names:tc:ciq:xpil:3}OrganisationInfoTypeList" />
* <attribute name="CategoryType" type="{urn:oasis:names:tc:ciq:xpil:3}OrganisationCategoryTypeList" />
* <attribute name="Status" type="{urn:oasis:names:tc:ciq:ct:3}StatusList" />
* <attribute name="Nature" type="{urn:oasis:names:tc:ciq:xpil:3}OrganisationInfoNatureList" />
* <attribute name="IndustryType" type="{urn:oasis:names:tc:ciq:xpil:3}IndustryTypeList" />
* <attribute name="IndustryCode" type="{urn:oasis:names:tc:ciq:xpil:3}IndustryCodeList" />
* <attribute name="IndustryCodeType" type="{urn:oasis:names:tc:ciq:ct:3}String" />
* <attribute name="NumberOfEmployees" type="{urn:oasis:names:tc:ciq:ct:3}String" />
* <attribute name="OperatingHourStartTime" type="{http://www.w3.org/2001/XMLSchema}time" />
* <attribute name="OperatingHourEndTime" type="{http://www.w3.org/2001/XMLSchema}time" />
* <anyAttribute processContents='lax' namespace='##other'/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "OrganisationInfo")
public class OrganisationInfo implements Equals, HashCode, ToString {
@XmlAttribute(name = "Type", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String type;
@XmlAttribute(name = "CategoryType", namespace = "urn:oasis:names:tc:ciq:xpil:3")
protected OrganisationCategoryTypeList categoryType;
@XmlAttribute(name = "Status", namespace = "urn:oasis:names:tc:ciq:xpil:3")
protected String status;
@XmlAttribute(name = "Nature", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String nature;
@XmlAttribute(name = "IndustryType", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String industryType;
@XmlAttribute(name = "IndustryCode", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String industryCode;
@XmlAttribute(name = "IndustryCodeType", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String industryCodeType;
@XmlAttribute(name = "NumberOfEmployees", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String numberOfEmployees;
@XmlAttribute(name = "OperatingHourStartTime", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlSchemaType(name = "time")
protected XMLGregorianCalendar operatingHourStartTime;
@XmlAttribute(name = "OperatingHourEndTime", namespace = "urn:oasis:names:tc:ciq:xpil:3")
@XmlSchemaType(name = "time")
protected XMLGregorianCalendar operatingHourEndTime;
@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 OrganisationInfo() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public OrganisationInfo(final String type,
final OrganisationCategoryTypeList categoryType,
final String status, final String nature,
final String industryType, final String industryCode,
final String industryCodeType, final String numberOfEmployees,
final XMLGregorianCalendar operatingHourStartTime,
final XMLGregorianCalendar operatingHourEndTime,
final DataQualityTypeList dataQualityType,
final XMLGregorianCalendar validFrom,
final XMLGregorianCalendar validTo,
final Map otherAttributes) {
this.type = type;
this.categoryType = categoryType;
this.status = status;
this.nature = nature;
this.industryType = industryType;
this.industryCode = industryCode;
this.industryCodeType = industryCodeType;
this.numberOfEmployees = numberOfEmployees;
this.operatingHourStartTime = operatingHourStartTime;
this.operatingHourEndTime = operatingHourEndTime;
this.dataQualityType = dataQualityType;
this.validFrom = validFrom;
this.validTo = validTo;
this.otherAttributes = otherAttributes;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Gets the value of the categoryType property.
*
* @return
* possible object is
* {@link OrganisationCategoryTypeList }
*
*/
public OrganisationCategoryTypeList getCategoryType() {
return categoryType;
}
/**
* Sets the value of the categoryType property.
*
* @param value
* allowed object is
* {@link OrganisationCategoryTypeList }
*
*/
public void setCategoryType(OrganisationCategoryTypeList value) {
this.categoryType = 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 nature property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNature() {
return nature;
}
/**
* Sets the value of the nature property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNature(String value) {
this.nature = value;
}
/**
* Gets the value of the industryType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndustryType() {
return industryType;
}
/**
* Sets the value of the industryType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndustryType(String value) {
this.industryType = value;
}
/**
* Gets the value of the industryCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndustryCode() {
return industryCode;
}
/**
* Sets the value of the industryCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndustryCode(String value) {
this.industryCode = value;
}
/**
* Gets the value of the industryCodeType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIndustryCodeType() {
return industryCodeType;
}
/**
* Sets the value of the industryCodeType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIndustryCodeType(String value) {
this.industryCodeType = value;
}
/**
* Gets the value of the numberOfEmployees property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNumberOfEmployees() {
return numberOfEmployees;
}
/**
* Sets the value of the numberOfEmployees property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNumberOfEmployees(String value) {
this.numberOfEmployees = value;
}
/**
* Gets the value of the operatingHourStartTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getOperatingHourStartTime() {
return operatingHourStartTime;
}
/**
* Sets the value of the operatingHourStartTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setOperatingHourStartTime(XMLGregorianCalendar value) {
this.operatingHourStartTime = value;
}
/**
* Gets the value of the operatingHourEndTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getOperatingHourEndTime() {
return operatingHourEndTime;
}
/**
* Sets the value of the operatingHourEndTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setOperatingHourEndTime(XMLGregorianCalendar value) {
this.operatingHourEndTime = 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 OrganisationInfo)) {
return false;
}
if (this == object) {
return true;
}
final OrganisationInfo that = ((OrganisationInfo) object);
{
String lhsType;
lhsType = this.getType();
String rhsType;
rhsType = that.getType();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "type", lhsType),
LocatorUtils.property(thatLocator, "type", rhsType),
lhsType, rhsType)) {
return false;
}
}
{
OrganisationCategoryTypeList lhsCategoryType;
lhsCategoryType = this.getCategoryType();
OrganisationCategoryTypeList rhsCategoryType;
rhsCategoryType = that.getCategoryType();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"categoryType", lhsCategoryType), LocatorUtils.property(
thatLocator, "categoryType", rhsCategoryType),
lhsCategoryType, rhsCategoryType)) {
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 lhsNature;
lhsNature = this.getNature();
String rhsNature;
rhsNature = that.getNature();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "nature", lhsNature),
LocatorUtils.property(thatLocator, "nature", rhsNature),
lhsNature, rhsNature)) {
return false;
}
}
{
String lhsIndustryType;
lhsIndustryType = this.getIndustryType();
String rhsIndustryType;
rhsIndustryType = that.getIndustryType();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"industryType", lhsIndustryType), LocatorUtils.property(
thatLocator, "industryType", rhsIndustryType),
lhsIndustryType, rhsIndustryType)) {
return false;
}
}
{
String lhsIndustryCode;
lhsIndustryCode = this.getIndustryCode();
String rhsIndustryCode;
rhsIndustryCode = that.getIndustryCode();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"industryCode", lhsIndustryCode), LocatorUtils.property(
thatLocator, "industryCode", rhsIndustryCode),
lhsIndustryCode, rhsIndustryCode)) {
return false;
}
}
{
String lhsIndustryCodeType;
lhsIndustryCodeType = this.getIndustryCodeType();
String rhsIndustryCodeType;
rhsIndustryCodeType = that.getIndustryCodeType();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"industryCodeType", lhsIndustryCodeType), LocatorUtils
.property(thatLocator, "industryCodeType",
rhsIndustryCodeType), lhsIndustryCodeType,
rhsIndustryCodeType)) {
return false;
}
}
{
String lhsNumberOfEmployees;
lhsNumberOfEmployees = this.getNumberOfEmployees();
String rhsNumberOfEmployees;
rhsNumberOfEmployees = that.getNumberOfEmployees();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"numberOfEmployees", lhsNumberOfEmployees), LocatorUtils
.property(thatLocator, "numberOfEmployees",
rhsNumberOfEmployees), lhsNumberOfEmployees,
rhsNumberOfEmployees)) {
return false;
}
}
{
XMLGregorianCalendar lhsOperatingHourStartTime;
lhsOperatingHourStartTime = this.getOperatingHourStartTime();
XMLGregorianCalendar rhsOperatingHourStartTime;
rhsOperatingHourStartTime = that.getOperatingHourStartTime();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"operatingHourStartTime", lhsOperatingHourStartTime),
LocatorUtils
.property(thatLocator, "operatingHourStartTime",
rhsOperatingHourStartTime),
lhsOperatingHourStartTime, rhsOperatingHourStartTime)) {
return false;
}
}
{
XMLGregorianCalendar lhsOperatingHourEndTime;
lhsOperatingHourEndTime = this.getOperatingHourEndTime();
XMLGregorianCalendar rhsOperatingHourEndTime;
rhsOperatingHourEndTime = that.getOperatingHourEndTime();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"operatingHourEndTime", lhsOperatingHourEndTime),
LocatorUtils.property(thatLocator, "operatingHourEndTime",
rhsOperatingHourEndTime), lhsOperatingHourEndTime,
rhsOperatingHourEndTime)) {
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;
{
String theType;
theType = this.getType();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "type", theType),
currentHashCode, theType);
}
{
OrganisationCategoryTypeList theCategoryType;
theCategoryType = this.getCategoryType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"categoryType", theCategoryType), currentHashCode,
theCategoryType);
}
{
String theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "status", theStatus),
currentHashCode, theStatus);
}
{
String theNature;
theNature = this.getNature();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "nature", theNature),
currentHashCode, theNature);
}
{
String theIndustryType;
theIndustryType = this.getIndustryType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"industryType", theIndustryType), currentHashCode,
theIndustryType);
}
{
String theIndustryCode;
theIndustryCode = this.getIndustryCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"industryCode", theIndustryCode), currentHashCode,
theIndustryCode);
}
{
String theIndustryCodeType;
theIndustryCodeType = this.getIndustryCodeType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"industryCodeType", theIndustryCodeType), currentHashCode,
theIndustryCodeType);
}
{
String theNumberOfEmployees;
theNumberOfEmployees = this.getNumberOfEmployees();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"numberOfEmployees", theNumberOfEmployees),
currentHashCode, theNumberOfEmployees);
}
{
XMLGregorianCalendar theOperatingHourStartTime;
theOperatingHourStartTime = this.getOperatingHourStartTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"operatingHourStartTime", theOperatingHourStartTime),
currentHashCode, theOperatingHourStartTime);
}
{
XMLGregorianCalendar theOperatingHourEndTime;
theOperatingHourEndTime = this.getOperatingHourEndTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"operatingHourEndTime", theOperatingHourEndTime),
currentHashCode, theOperatingHourEndTime);
}
{
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 OrganisationInfo withType(String value) {
setType(value);
return this;
}
public OrganisationInfo withCategoryType(OrganisationCategoryTypeList value) {
setCategoryType(value);
return this;
}
public OrganisationInfo withStatus(String value) {
setStatus(value);
return this;
}
public OrganisationInfo withNature(String value) {
setNature(value);
return this;
}
public OrganisationInfo withIndustryType(String value) {
setIndustryType(value);
return this;
}
public OrganisationInfo withIndustryCode(String value) {
setIndustryCode(value);
return this;
}
public OrganisationInfo withIndustryCodeType(String value) {
setIndustryCodeType(value);
return this;
}
public OrganisationInfo withNumberOfEmployees(String value) {
setNumberOfEmployees(value);
return this;
}
public OrganisationInfo withOperatingHourStartTime(
XMLGregorianCalendar value) {
setOperatingHourStartTime(value);
return this;
}
public OrganisationInfo withOperatingHourEndTime(XMLGregorianCalendar value) {
setOperatingHourEndTime(value);
return this;
}
public OrganisationInfo withDataQualityType(DataQualityTypeList value) {
setDataQualityType(value);
return this;
}
public OrganisationInfo withValidFrom(XMLGregorianCalendar value) {
setValidFrom(value);
return this;
}
public OrganisationInfo 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) {
{
String theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType);
}
{
OrganisationCategoryTypeList theCategoryType;
theCategoryType = this.getCategoryType();
strategy.appendField(locator, this, "categoryType", buffer,
theCategoryType);
}
{
String theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
{
String theNature;
theNature = this.getNature();
strategy.appendField(locator, this, "nature", buffer, theNature);
}
{
String theIndustryType;
theIndustryType = this.getIndustryType();
strategy.appendField(locator, this, "industryType", buffer,
theIndustryType);
}
{
String theIndustryCode;
theIndustryCode = this.getIndustryCode();
strategy.appendField(locator, this, "industryCode", buffer,
theIndustryCode);
}
{
String theIndustryCodeType;
theIndustryCodeType = this.getIndustryCodeType();
strategy.appendField(locator, this, "industryCodeType", buffer,
theIndustryCodeType);
}
{
String theNumberOfEmployees;
theNumberOfEmployees = this.getNumberOfEmployees();
strategy.appendField(locator, this, "numberOfEmployees", buffer,
theNumberOfEmployees);
}
{
XMLGregorianCalendar theOperatingHourStartTime;
theOperatingHourStartTime = this.getOperatingHourStartTime();
strategy.appendField(locator, this, "operatingHourStartTime",
buffer, theOperatingHourStartTime);
}
{
XMLGregorianCalendar theOperatingHourEndTime;
theOperatingHourEndTime = this.getOperatingHourEndTime();
strategy.appendField(locator, this, "operatingHourEndTime", buffer,
theOperatingHourEndTime);
}
{
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, OrganisationInfo.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 OrganisationInfo instance for XML String
*
* @param text
* XML String for the document
* @return The OrganisationInfo instance for the passed XML String
*/
public static OrganisationInfo fromXMLString(String text) {
JAXBContext jaxbContext;
try {
jaxbContext = JAXBContext.newInstance(OrganisationInfo.class
.getPackage().getName());
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(STIXSchema.getInstance().getSchema());
unmarshaller.setEventHandler(new ValidationEventHandler());
StreamSource streamSource = new StreamSource(new StringReader(text));
return (OrganisationInfo) unmarshaller.unmarshal(streamSource);
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}
/**
* Validates the XML representation of this OrganisationInfo 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());
}
}