All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xml.metadatasharing.MalwareMetaData Maven / Gradle / Ivy

There is a newer version: 1.2.0.2
Show 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.06.23 at 10:59:44 AM EDT 
//

package xml.metadatasharing;

import java.io.StringReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
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.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.datatype.XMLGregorianCalendar;
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.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;

/**
 * 

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="company" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="author" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="comment" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         <element name="objects" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="file" type="{http://xml/metadataSharing.xsd}fileObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="uri" type="{http://xml/metadataSharing.xsd}uriObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="domain" type="{http://xml/metadataSharing.xsd}domainObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="registry" type="{http://xml/metadataSharing.xsd}registryObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="ip" type="{http://xml/metadataSharing.xsd}IPObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="asn" type="{http://xml/metadataSharing.xsd}ASNObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="entity" type="{http://xml/metadataSharing.xsd}entityObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="classification" type="{http://xml/metadataSharing.xsd}classificationObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="softwarePackage" type="{http://xml/metadataSharing.xsd}softwarePackageObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="digitalSignature" type="{http://xml/metadataSharing.xsd}digitalSignatureObject" maxOccurs="unbounded" minOccurs="0"/>
 *                   <element name="taggant" type="{http://xml/metadataSharing.xsd}taggantObject" maxOccurs="unbounded" minOccurs="0"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="objectProperties" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="objectProperty" type="{http://xml/metadataSharing.xsd}objectProperty" maxOccurs="unbounded"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="relationships" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="relationship" type="{http://xml/metadataSharing.xsd}relationship" maxOccurs="unbounded"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="fieldData" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="fieldDataEntry" type="{http://xml/metadataSharing.xsd}fieldDataEntry" maxOccurs="unbounded"/>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *       </sequence>
 *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}decimal" fixed="1.2" />
 *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "company", "author", "comment", "timestamp", "objects", "objectProperties", "relationships", "fieldData" }) @XmlRootElement(name = "malwareMetaData") public class MalwareMetaData implements Equals, HashCode, ToString { @XmlElement(required = true) protected String company; @XmlElement(required = true) protected String author; @XmlElement(required = true) protected String comment; @XmlElement(required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar timestamp; protected MalwareMetaData.Objects objects; protected MalwareMetaData.ObjectProperties objectProperties; protected MalwareMetaData.Relationships relationships; protected MalwareMetaData.FieldData fieldData; @XmlAttribute(name = "version", required = true) protected BigDecimal version; @XmlAttribute(name = "id", required = true) protected String id; /** * Default no-arg constructor * */ public MalwareMetaData() { super(); } /** * Fully-initialising value constructor * */ public MalwareMetaData(final String company, final String author, final String comment, final XMLGregorianCalendar timestamp, final MalwareMetaData.Objects objects, final MalwareMetaData.ObjectProperties objectProperties, final MalwareMetaData.Relationships relationships, final MalwareMetaData.FieldData fieldData, final BigDecimal version, final String id) { this.company = company; this.author = author; this.comment = comment; this.timestamp = timestamp; this.objects = objects; this.objectProperties = objectProperties; this.relationships = relationships; this.fieldData = fieldData; this.version = version; this.id = id; } /** * Gets the value of the company property. * * @return * possible object is * {@link String } * */ public String getCompany() { return company; } /** * Sets the value of the company property. * * @param value * allowed object is * {@link String } * */ public void setCompany(String value) { this.company = value; } /** * Gets the value of the author property. * * @return * possible object is * {@link String } * */ public String getAuthor() { return author; } /** * Sets the value of the author property. * * @param value * allowed object is * {@link String } * */ public void setAuthor(String value) { this.author = value; } /** * Gets the value of the comment property. * * @return * possible object is * {@link String } * */ public String getComment() { return comment; } /** * Sets the value of the comment property. * * @param value * allowed object is * {@link String } * */ public void setComment(String value) { this.comment = value; } /** * Gets the value of the timestamp property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getTimestamp() { return timestamp; } /** * Sets the value of the timestamp property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setTimestamp(XMLGregorianCalendar value) { this.timestamp = value; } /** * Gets the value of the objects property. * * @return * possible object is * {@link MalwareMetaData.Objects } * */ public MalwareMetaData.Objects getObjects() { return objects; } /** * Sets the value of the objects property. * * @param value * allowed object is * {@link MalwareMetaData.Objects } * */ public void setObjects(MalwareMetaData.Objects value) { this.objects = value; } /** * Gets the value of the objectProperties property. * * @return * possible object is * {@link MalwareMetaData.ObjectProperties } * */ public MalwareMetaData.ObjectProperties getObjectProperties() { return objectProperties; } /** * Sets the value of the objectProperties property. * * @param value * allowed object is * {@link MalwareMetaData.ObjectProperties } * */ public void setObjectProperties(MalwareMetaData.ObjectProperties value) { this.objectProperties = value; } /** * Gets the value of the relationships property. * * @return * possible object is * {@link MalwareMetaData.Relationships } * */ public MalwareMetaData.Relationships getRelationships() { return relationships; } /** * Sets the value of the relationships property. * * @param value * allowed object is * {@link MalwareMetaData.Relationships } * */ public void setRelationships(MalwareMetaData.Relationships value) { this.relationships = value; } /** * Gets the value of the fieldData property. * * @return * possible object is * {@link MalwareMetaData.FieldData } * */ public MalwareMetaData.FieldData getFieldData() { return fieldData; } /** * Sets the value of the fieldData property. * * @param value * allowed object is * {@link MalwareMetaData.FieldData } * */ public void setFieldData(MalwareMetaData.FieldData value) { this.fieldData = value; } /** * Gets the value of the version property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getVersion() { if (version == null) { return new BigDecimal("1.2"); } else { return version; } } /** * Sets the value of the version property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setVersion(BigDecimal value) { this.version = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MalwareMetaData)) { return false; } if (this == object) { return true; } final MalwareMetaData that = ((MalwareMetaData) object); { String lhsCompany; lhsCompany = this.getCompany(); String rhsCompany; rhsCompany = that.getCompany(); if (!strategy.equals( LocatorUtils.property(thisLocator, "company", lhsCompany), LocatorUtils.property(thatLocator, "company", rhsCompany), lhsCompany, rhsCompany)) { return false; } } { String lhsAuthor; lhsAuthor = this.getAuthor(); String rhsAuthor; rhsAuthor = that.getAuthor(); if (!strategy.equals( LocatorUtils.property(thisLocator, "author", lhsAuthor), LocatorUtils.property(thatLocator, "author", rhsAuthor), lhsAuthor, rhsAuthor)) { return false; } } { String lhsComment; lhsComment = this.getComment(); String rhsComment; rhsComment = that.getComment(); if (!strategy.equals( LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment)) { return false; } } { XMLGregorianCalendar lhsTimestamp; lhsTimestamp = this.getTimestamp(); XMLGregorianCalendar rhsTimestamp; rhsTimestamp = that.getTimestamp(); if (!strategy.equals(LocatorUtils.property(thisLocator, "timestamp", lhsTimestamp), LocatorUtils.property( thatLocator, "timestamp", rhsTimestamp), lhsTimestamp, rhsTimestamp)) { return false; } } { MalwareMetaData.Objects lhsObjects; lhsObjects = this.getObjects(); MalwareMetaData.Objects rhsObjects; rhsObjects = that.getObjects(); if (!strategy.equals( LocatorUtils.property(thisLocator, "objects", lhsObjects), LocatorUtils.property(thatLocator, "objects", rhsObjects), lhsObjects, rhsObjects)) { return false; } } { MalwareMetaData.ObjectProperties lhsObjectProperties; lhsObjectProperties = this.getObjectProperties(); MalwareMetaData.ObjectProperties rhsObjectProperties; rhsObjectProperties = that.getObjectProperties(); if (!strategy.equals(LocatorUtils.property(thisLocator, "objectProperties", lhsObjectProperties), LocatorUtils .property(thatLocator, "objectProperties", rhsObjectProperties), lhsObjectProperties, rhsObjectProperties)) { return false; } } { MalwareMetaData.Relationships lhsRelationships; lhsRelationships = this.getRelationships(); MalwareMetaData.Relationships rhsRelationships; rhsRelationships = that.getRelationships(); if (!strategy.equals(LocatorUtils.property(thisLocator, "relationships", lhsRelationships), LocatorUtils.property( thatLocator, "relationships", rhsRelationships), lhsRelationships, rhsRelationships)) { return false; } } { MalwareMetaData.FieldData lhsFieldData; lhsFieldData = this.getFieldData(); MalwareMetaData.FieldData rhsFieldData; rhsFieldData = that.getFieldData(); if (!strategy.equals(LocatorUtils.property(thisLocator, "fieldData", lhsFieldData), LocatorUtils.property( thatLocator, "fieldData", rhsFieldData), lhsFieldData, rhsFieldData)) { return false; } } { BigDecimal lhsVersion; lhsVersion = this.getVersion(); BigDecimal rhsVersion; rhsVersion = that.getVersion(); if (!strategy.equals( LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion)) { return false; } } { String lhsId; lhsId = this.getId(); String rhsId; rhsId = that.getId(); if (!strategy.equals( LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) { 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 theCompany; theCompany = this.getCompany(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "company", theCompany), currentHashCode, theCompany); } { String theAuthor; theAuthor = this.getAuthor(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "author", theAuthor), currentHashCode, theAuthor); } { String theComment; theComment = this.getComment(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment); } { XMLGregorianCalendar theTimestamp; theTimestamp = this.getTimestamp(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "timestamp", theTimestamp), currentHashCode, theTimestamp); } { MalwareMetaData.Objects theObjects; theObjects = this.getObjects(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "objects", theObjects), currentHashCode, theObjects); } { MalwareMetaData.ObjectProperties theObjectProperties; theObjectProperties = this.getObjectProperties(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "objectProperties", theObjectProperties), currentHashCode, theObjectProperties); } { MalwareMetaData.Relationships theRelationships; theRelationships = this.getRelationships(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relationships", theRelationships), currentHashCode, theRelationships); } { MalwareMetaData.FieldData theFieldData; theFieldData = this.getFieldData(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "fieldData", theFieldData), currentHashCode, theFieldData); } { BigDecimal theVersion; theVersion = this.getVersion(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion); } { String theId; theId = this.getId(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "id", theId), currentHashCode, theId); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public MalwareMetaData withCompany(String value) { setCompany(value); return this; } public MalwareMetaData withAuthor(String value) { setAuthor(value); return this; } public MalwareMetaData withComment(String value) { setComment(value); return this; } public MalwareMetaData withTimestamp(XMLGregorianCalendar value) { setTimestamp(value); return this; } public MalwareMetaData withObjects(MalwareMetaData.Objects value) { setObjects(value); return this; } public MalwareMetaData withObjectProperties( MalwareMetaData.ObjectProperties value) { setObjectProperties(value); return this; } public MalwareMetaData withRelationships(MalwareMetaData.Relationships value) { setRelationships(value); return this; } public MalwareMetaData withFieldData(MalwareMetaData.FieldData value) { setFieldData(value); return this; } public MalwareMetaData withVersion(BigDecimal value) { setVersion(value); return this; } public MalwareMetaData withId(String value) { setId(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 theCompany; theCompany = this.getCompany(); strategy.appendField(locator, this, "company", buffer, theCompany); } { String theAuthor; theAuthor = this.getAuthor(); strategy.appendField(locator, this, "author", buffer, theAuthor); } { String theComment; theComment = this.getComment(); strategy.appendField(locator, this, "comment", buffer, theComment); } { XMLGregorianCalendar theTimestamp; theTimestamp = this.getTimestamp(); strategy.appendField(locator, this, "timestamp", buffer, theTimestamp); } { MalwareMetaData.Objects theObjects; theObjects = this.getObjects(); strategy.appendField(locator, this, "objects", buffer, theObjects); } { MalwareMetaData.ObjectProperties theObjectProperties; theObjectProperties = this.getObjectProperties(); strategy.appendField(locator, this, "objectProperties", buffer, theObjectProperties); } { MalwareMetaData.Relationships theRelationships; theRelationships = this.getRelationships(); strategy.appendField(locator, this, "relationships", buffer, theRelationships); } { MalwareMetaData.FieldData theFieldData; theFieldData = this.getFieldData(); strategy.appendField(locator, this, "fieldData", buffer, theFieldData); } { BigDecimal theVersion; theVersion = this.getVersion(); strategy.appendField(locator, this, "version", buffer, theVersion); } { String theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId); } 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 name="fieldDataEntry" type="{http://xml/metadataSharing.xsd}fieldDataEntry" maxOccurs="unbounded"/>
	 *       </sequence>
	 *     </restriction>
	 *   </complexContent>
	 * </complexType>
	 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "fieldDataEntries" }) public static class FieldData implements Equals, HashCode, ToString { @XmlElement(name = "fieldDataEntry", required = true) protected List fieldDataEntries; /** * Default no-arg constructor * */ public FieldData() { super(); } /** * Fully-initialising value constructor * */ public FieldData(final List fieldDataEntries) { this.fieldDataEntries = fieldDataEntries; } /** * Gets the value of the fieldDataEntries 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 fieldDataEntries property. * *

* For example, to add a new item, do as follows: *

		 *    getFieldDataEntries().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link FieldDataEntry } * * */ public List getFieldDataEntries() { if (fieldDataEntries == null) { fieldDataEntries = new ArrayList(); } return this.fieldDataEntries; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MalwareMetaData.FieldData)) { return false; } if (this == object) { return true; } final MalwareMetaData.FieldData that = ((MalwareMetaData.FieldData) object); { List lhsFieldDataEntries; lhsFieldDataEntries = (((this.fieldDataEntries != null) && (!this.fieldDataEntries .isEmpty())) ? this.getFieldDataEntries() : null); List rhsFieldDataEntries; rhsFieldDataEntries = (((that.fieldDataEntries != null) && (!that.fieldDataEntries .isEmpty())) ? that.getFieldDataEntries() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "fieldDataEntries", lhsFieldDataEntries), LocatorUtils .property(thatLocator, "fieldDataEntries", rhsFieldDataEntries), lhsFieldDataEntries, rhsFieldDataEntries)) { 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 theFieldDataEntries; theFieldDataEntries = (((this.fieldDataEntries != null) && (!this.fieldDataEntries .isEmpty())) ? this.getFieldDataEntries() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "fieldDataEntries", theFieldDataEntries), currentHashCode, theFieldDataEntries); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public MalwareMetaData.FieldData withFieldDataEntries( FieldDataEntry... values) { if (values != null) { for (FieldDataEntry value : values) { getFieldDataEntries().add(value); } } return this; } public MalwareMetaData.FieldData withFieldDataEntries( Collection values) { if (values != null) { getFieldDataEntries().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 theFieldDataEntries; theFieldDataEntries = (((this.fieldDataEntries != null) && (!this.fieldDataEntries .isEmpty())) ? this.getFieldDataEntries() : null); strategy.appendField(locator, this, "fieldDataEntries", buffer, theFieldDataEntries); } 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 name="objectProperty" type="{http://xml/metadataSharing.xsd}objectProperty" maxOccurs="unbounded"/>
	 *       </sequence>
	 *     </restriction>
	 *   </complexContent>
	 * </complexType>
	 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "objectProperties" }) public static class ObjectProperties implements Equals, HashCode, ToString { @XmlElement(name = "objectProperty", required = true) protected List objectProperties; /** * Default no-arg constructor * */ public ObjectProperties() { super(); } /** * Fully-initialising value constructor * */ public ObjectProperties(final List objectProperties) { this.objectProperties = objectProperties; } /** * Gets the value of the objectProperties 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 objectProperties property. * *

* For example, to add a new item, do as follows: *

		 *    getObjectProperties().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ObjectProperty } * * */ public List getObjectProperties() { if (objectProperties == null) { objectProperties = new ArrayList(); } return this.objectProperties; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MalwareMetaData.ObjectProperties)) { return false; } if (this == object) { return true; } final MalwareMetaData.ObjectProperties that = ((MalwareMetaData.ObjectProperties) object); { List lhsObjectProperties; lhsObjectProperties = (((this.objectProperties != null) && (!this.objectProperties .isEmpty())) ? this.getObjectProperties() : null); List rhsObjectProperties; rhsObjectProperties = (((that.objectProperties != null) && (!that.objectProperties .isEmpty())) ? that.getObjectProperties() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "objectProperties", lhsObjectProperties), LocatorUtils .property(thatLocator, "objectProperties", rhsObjectProperties), lhsObjectProperties, rhsObjectProperties)) { 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 theObjectProperties; theObjectProperties = (((this.objectProperties != null) && (!this.objectProperties .isEmpty())) ? this.getObjectProperties() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "objectProperties", theObjectProperties), currentHashCode, theObjectProperties); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public MalwareMetaData.ObjectProperties withObjectProperties( ObjectProperty... values) { if (values != null) { for (ObjectProperty value : values) { getObjectProperties().add(value); } } return this; } public MalwareMetaData.ObjectProperties withObjectProperties( Collection values) { if (values != null) { getObjectProperties().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 theObjectProperties; theObjectProperties = (((this.objectProperties != null) && (!this.objectProperties .isEmpty())) ? this.getObjectProperties() : null); strategy.appendField(locator, this, "objectProperties", buffer, theObjectProperties); } 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 name="file" type="{http://xml/metadataSharing.xsd}fileObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="uri" type="{http://xml/metadataSharing.xsd}uriObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="domain" type="{http://xml/metadataSharing.xsd}domainObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="registry" type="{http://xml/metadataSharing.xsd}registryObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="ip" type="{http://xml/metadataSharing.xsd}IPObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="asn" type="{http://xml/metadataSharing.xsd}ASNObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="entity" type="{http://xml/metadataSharing.xsd}entityObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="classification" type="{http://xml/metadataSharing.xsd}classificationObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="softwarePackage" type="{http://xml/metadataSharing.xsd}softwarePackageObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="digitalSignature" type="{http://xml/metadataSharing.xsd}digitalSignatureObject" maxOccurs="unbounded" minOccurs="0"/>
	 *         <element name="taggant" type="{http://xml/metadataSharing.xsd}taggantObject" maxOccurs="unbounded" minOccurs="0"/>
	 *       </sequence>
	 *     </restriction>
	 *   </complexContent>
	 * </complexType>
	 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "files", "uris", "domains", "registries", "ips", "asns", "entities", "classifications", "softwarePackages", "digitalSignatures", "taggants" }) public static class Objects implements Equals, HashCode, ToString { @XmlElement(name = "file") protected List files; @XmlElement(name = "uri") protected List uris; @XmlElement(name = "domain") protected List domains; @XmlElement(name = "registry") protected List registries; @XmlElement(name = "ip") protected List ips; @XmlElement(name = "asn") protected List asns; @XmlElement(name = "entity") protected List entities; @XmlElement(name = "classification") protected List classifications; @XmlElement(name = "softwarePackage") protected List softwarePackages; @XmlElement(name = "digitalSignature") protected List digitalSignatures; @XmlElement(name = "taggant") protected List taggants; /** * Default no-arg constructor * */ public Objects() { super(); } /** * Fully-initialising value constructor * */ public Objects(final List files, final List uris, final List domains, final List registries, final List ips, final List asns, final List entities, final List classifications, final List softwarePackages, final List digitalSignatures, final List taggants) { this.files = files; this.uris = uris; this.domains = domains; this.registries = registries; this.ips = ips; this.asns = asns; this.entities = entities; this.classifications = classifications; this.softwarePackages = softwarePackages; this.digitalSignatures = digitalSignatures; this.taggants = taggants; } /** * Gets the value of the files 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 files property. * *

* For example, to add a new item, do as follows: *

		 *    getFiles().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link FileObject } * * */ public List getFiles() { if (files == null) { files = new ArrayList(); } return this.files; } /** * Gets the value of the uris 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 uris property. * *

* For example, to add a new item, do as follows: *

		 *    getUris().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link UriObject } * * */ public List getUris() { if (uris == null) { uris = new ArrayList(); } return this.uris; } /** * Gets the value of the domains 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 domains property. * *

* For example, to add a new item, do as follows: *

		 *    getDomains().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link DomainObject } * * */ public List getDomains() { if (domains == null) { domains = new ArrayList(); } return this.domains; } /** * Gets the value of the registries 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 registries property. * *

* For example, to add a new item, do as follows: *

		 *    getRegistries().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link RegistryObject } * * */ public List getRegistries() { if (registries == null) { registries = new ArrayList(); } return this.registries; } /** * Gets the value of the ips 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 ips property. * *

* For example, to add a new item, do as follows: *

		 *    getIps().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link IPObject } * * */ public List getIps() { if (ips == null) { ips = new ArrayList(); } return this.ips; } /** * Gets the value of the asns 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 asns property. * *

* For example, to add a new item, do as follows: *

		 *    getAsns().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ASNObject } * * */ public List getAsns() { if (asns == null) { asns = new ArrayList(); } return this.asns; } /** * Gets the value of the entities 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 entities property. * *

* For example, to add a new item, do as follows: *

		 *    getEntities().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link EntityObject } * * */ public List getEntities() { if (entities == null) { entities = new ArrayList(); } return this.entities; } /** * Gets the value of the classifications 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 classifications property. * *

* For example, to add a new item, do as follows: *

		 *    getClassifications().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ClassificationObject } * * */ public List getClassifications() { if (classifications == null) { classifications = new ArrayList(); } return this.classifications; } /** * Gets the value of the softwarePackages 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 softwarePackages property. * *

* For example, to add a new item, do as follows: *

		 *    getSoftwarePackages().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link SoftwarePackageObject } * * */ public List getSoftwarePackages() { if (softwarePackages == null) { softwarePackages = new ArrayList(); } return this.softwarePackages; } /** * Gets the value of the digitalSignatures 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 digitalSignatures property. * *

* For example, to add a new item, do as follows: *

		 *    getDigitalSignatures().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link DigitalSignatureObject } * * */ public List getDigitalSignatures() { if (digitalSignatures == null) { digitalSignatures = new ArrayList(); } return this.digitalSignatures; } /** * Gets the value of the taggants 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 taggants property. * *

* For example, to add a new item, do as follows: *

		 *    getTaggants().add(newItem);
		 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link TaggantObject } * * */ public List getTaggants() { if (taggants == null) { taggants = new ArrayList(); } return this.taggants; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MalwareMetaData.Objects)) { return false; } if (this == object) { return true; } final MalwareMetaData.Objects that = ((MalwareMetaData.Objects) object); { List lhsFiles; lhsFiles = (((this.files != null) && (!this.files.isEmpty())) ? this .getFiles() : null); List rhsFiles; rhsFiles = (((that.files != null) && (!that.files.isEmpty())) ? that .getFiles() : null); if (!strategy.equals( LocatorUtils.property(thisLocator, "files", lhsFiles), LocatorUtils.property(thatLocator, "files", rhsFiles), lhsFiles, rhsFiles)) { return false; } } { List lhsUris; lhsUris = (((this.uris != null) && (!this.uris.isEmpty())) ? this .getUris() : null); List rhsUris; rhsUris = (((that.uris != null) && (!that.uris.isEmpty())) ? that .getUris() : null); if (!strategy.equals( LocatorUtils.property(thisLocator, "uris", lhsUris), LocatorUtils.property(thatLocator, "uris", rhsUris), lhsUris, rhsUris)) { return false; } } { List lhsDomains; lhsDomains = (((this.domains != null) && (!this.domains .isEmpty())) ? this.getDomains() : null); List rhsDomains; rhsDomains = (((that.domains != null) && (!that.domains .isEmpty())) ? that.getDomains() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "domains", lhsDomains), LocatorUtils.property( thatLocator, "domains", rhsDomains), lhsDomains, rhsDomains)) { return false; } } { List lhsRegistries; lhsRegistries = (((this.registries != null) && (!this.registries .isEmpty())) ? this.getRegistries() : null); List rhsRegistries; rhsRegistries = (((that.registries != null) && (!that.registries .isEmpty())) ? that.getRegistries() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "registries", lhsRegistries), LocatorUtils.property( thatLocator, "registries", rhsRegistries), lhsRegistries, rhsRegistries)) { return false; } } { List lhsIps; lhsIps = (((this.ips != null) && (!this.ips.isEmpty())) ? this .getIps() : null); List rhsIps; rhsIps = (((that.ips != null) && (!that.ips.isEmpty())) ? that .getIps() : null); if (!strategy.equals( LocatorUtils.property(thisLocator, "ips", lhsIps), LocatorUtils.property(thatLocator, "ips", rhsIps), lhsIps, rhsIps)) { return false; } } { List lhsAsns; lhsAsns = (((this.asns != null) && (!this.asns.isEmpty())) ? this .getAsns() : null); List rhsAsns; rhsAsns = (((that.asns != null) && (!that.asns.isEmpty())) ? that .getAsns() : null); if (!strategy.equals( LocatorUtils.property(thisLocator, "asns", lhsAsns), LocatorUtils.property(thatLocator, "asns", rhsAsns), lhsAsns, rhsAsns)) { return false; } } { List lhsEntities; lhsEntities = (((this.entities != null) && (!this.entities .isEmpty())) ? this.getEntities() : null); List rhsEntities; rhsEntities = (((that.entities != null) && (!that.entities .isEmpty())) ? that.getEntities() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entities", lhsEntities), LocatorUtils.property( thatLocator, "entities", rhsEntities), lhsEntities, rhsEntities)) { return false; } } { List lhsClassifications; lhsClassifications = (((this.classifications != null) && (!this.classifications .isEmpty())) ? this.getClassifications() : null); List rhsClassifications; rhsClassifications = (((that.classifications != null) && (!that.classifications .isEmpty())) ? that.getClassifications() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "classifications", lhsClassifications), LocatorUtils .property(thatLocator, "classifications", rhsClassifications), lhsClassifications, rhsClassifications)) { return false; } } { List lhsSoftwarePackages; lhsSoftwarePackages = (((this.softwarePackages != null) && (!this.softwarePackages .isEmpty())) ? this.getSoftwarePackages() : null); List rhsSoftwarePackages; rhsSoftwarePackages = (((that.softwarePackages != null) && (!that.softwarePackages .isEmpty())) ? that.getSoftwarePackages() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "softwarePackages", lhsSoftwarePackages), LocatorUtils .property(thatLocator, "softwarePackages", rhsSoftwarePackages), lhsSoftwarePackages, rhsSoftwarePackages)) { return false; } } { List lhsDigitalSignatures; lhsDigitalSignatures = (((this.digitalSignatures != null) && (!this.digitalSignatures .isEmpty())) ? this.getDigitalSignatures() : null); List rhsDigitalSignatures; rhsDigitalSignatures = (((that.digitalSignatures != null) && (!that.digitalSignatures .isEmpty())) ? that.getDigitalSignatures() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "digitalSignatures", lhsDigitalSignatures), LocatorUtils.property(thatLocator, "digitalSignatures", rhsDigitalSignatures), lhsDigitalSignatures, rhsDigitalSignatures)) { return false; } } { List lhsTaggants; lhsTaggants = (((this.taggants != null) && (!this.taggants .isEmpty())) ? this.getTaggants() : null); List rhsTaggants; rhsTaggants = (((that.taggants != null) && (!that.taggants .isEmpty())) ? that.getTaggants() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "taggants", lhsTaggants), LocatorUtils.property( thatLocator, "taggants", rhsTaggants), lhsTaggants, rhsTaggants)) { 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 theFiles; theFiles = (((this.files != null) && (!this.files.isEmpty())) ? this .getFiles() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "files", theFiles), currentHashCode, theFiles); } { List theUris; theUris = (((this.uris != null) && (!this.uris.isEmpty())) ? this .getUris() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "uris", theUris), currentHashCode, theUris); } { List theDomains; theDomains = (((this.domains != null) && (!this.domains .isEmpty())) ? this.getDomains() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "domains", theDomains), currentHashCode, theDomains); } { List theRegistries; theRegistries = (((this.registries != null) && (!this.registries .isEmpty())) ? this.getRegistries() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "registries", theRegistries), currentHashCode, theRegistries); } { List theIps; theIps = (((this.ips != null) && (!this.ips.isEmpty())) ? this .getIps() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "ips", theIps), currentHashCode, theIps); } { List theAsns; theAsns = (((this.asns != null) && (!this.asns.isEmpty())) ? this .getAsns() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "asns", theAsns), currentHashCode, theAsns); } { List theEntities; theEntities = (((this.entities != null) && (!this.entities .isEmpty())) ? this.getEntities() : null); currentHashCode = strategy .hashCode(LocatorUtils.property(locator, "entities", theEntities), currentHashCode, theEntities); } { List theClassifications; theClassifications = (((this.classifications != null) && (!this.classifications .isEmpty())) ? this.getClassifications() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "classifications", theClassifications), currentHashCode, theClassifications); } { List theSoftwarePackages; theSoftwarePackages = (((this.softwarePackages != null) && (!this.softwarePackages .isEmpty())) ? this.getSoftwarePackages() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "softwarePackages", theSoftwarePackages), currentHashCode, theSoftwarePackages); } { List theDigitalSignatures; theDigitalSignatures = (((this.digitalSignatures != null) && (!this.digitalSignatures .isEmpty())) ? this.getDigitalSignatures() : null); currentHashCode = strategy.hashCode(LocatorUtils.property( locator, "digitalSignatures", theDigitalSignatures), currentHashCode, theDigitalSignatures); } { List theTaggants; theTaggants = (((this.taggants != null) && (!this.taggants .isEmpty())) ? this.getTaggants() : null); currentHashCode = strategy .hashCode(LocatorUtils.property(locator, "taggants", theTaggants), currentHashCode, theTaggants); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public MalwareMetaData.Objects withFiles(FileObject... values) { if (values != null) { for (FileObject value : values) { getFiles().add(value); } } return this; } public MalwareMetaData.Objects withFiles(Collection values) { if (values != null) { getFiles().addAll(values); } return this; } public MalwareMetaData.Objects withUris(UriObject... values) { if (values != null) { for (UriObject value : values) { getUris().add(value); } } return this; } public MalwareMetaData.Objects withUris(Collection values) { if (values != null) { getUris().addAll(values); } return this; } public MalwareMetaData.Objects withDomains(DomainObject... values) { if (values != null) { for (DomainObject value : values) { getDomains().add(value); } } return this; } public MalwareMetaData.Objects withDomains( Collection values) { if (values != null) { getDomains().addAll(values); } return this; } public MalwareMetaData.Objects withRegistries(RegistryObject... values) { if (values != null) { for (RegistryObject value : values) { getRegistries().add(value); } } return this; } public MalwareMetaData.Objects withRegistries( Collection values) { if (values != null) { getRegistries().addAll(values); } return this; } public MalwareMetaData.Objects withIps(IPObject... values) { if (values != null) { for (IPObject value : values) { getIps().add(value); } } return this; } public MalwareMetaData.Objects withIps(Collection values) { if (values != null) { getIps().addAll(values); } return this; } public MalwareMetaData.Objects withAsns(ASNObject... values) { if (values != null) { for (ASNObject value : values) { getAsns().add(value); } } return this; } public MalwareMetaData.Objects withAsns(Collection values) { if (values != null) { getAsns().addAll(values); } return this; } public MalwareMetaData.Objects withEntities(EntityObject... values) { if (values != null) { for (EntityObject value : values) { getEntities().add(value); } } return this; } public MalwareMetaData.Objects withEntities( Collection values) { if (values != null) { getEntities().addAll(values); } return this; } public MalwareMetaData.Objects withClassifications( ClassificationObject... values) { if (values != null) { for (ClassificationObject value : values) { getClassifications().add(value); } } return this; } public MalwareMetaData.Objects withClassifications( Collection values) { if (values != null) { getClassifications().addAll(values); } return this; } public MalwareMetaData.Objects withSoftwarePackages( SoftwarePackageObject... values) { if (values != null) { for (SoftwarePackageObject value : values) { getSoftwarePackages().add(value); } } return this; } public MalwareMetaData.Objects withSoftwarePackages( Collection values) { if (values != null) { getSoftwarePackages().addAll(values); } return this; } public MalwareMetaData.Objects withDigitalSignatures( DigitalSignatureObject... values) { if (values != null) { for (DigitalSignatureObject value : values) { getDigitalSignatures().add(value); } } return this; } public MalwareMetaData.Objects withDigitalSignatures( Collection values) { if (values != null) { getDigitalSignatures().addAll(values); } return this; } public MalwareMetaData.Objects withTaggants(TaggantObject... values) { if (values != null) { for (TaggantObject value : values) { getTaggants().add(value); } } return this; } public MalwareMetaData.Objects withTaggants( Collection values) { if (values != null) { getTaggants().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 theFiles; theFiles = (((this.files != null) && (!this.files.isEmpty())) ? this .getFiles() : null); strategy.appendField(locator, this, "files", buffer, theFiles); } { List theUris; theUris = (((this.uris != null) && (!this.uris.isEmpty())) ? this .getUris() : null); strategy.appendField(locator, this, "uris", buffer, theUris); } { List theDomains; theDomains = (((this.domains != null) && (!this.domains .isEmpty())) ? this.getDomains() : null); strategy.appendField(locator, this, "domains", buffer, theDomains); } { List theRegistries; theRegistries = (((this.registries != null) && (!this.registries .isEmpty())) ? this.getRegistries() : null); strategy.appendField(locator, this, "registries", buffer, theRegistries); } { List theIps; theIps = (((this.ips != null) && (!this.ips.isEmpty())) ? this .getIps() : null); strategy.appendField(locator, this, "ips", buffer, theIps); } { List theAsns; theAsns = (((this.asns != null) && (!this.asns.isEmpty())) ? this .getAsns() : null); strategy.appendField(locator, this, "asns", buffer, theAsns); } { List theEntities; theEntities = (((this.entities != null) && (!this.entities .isEmpty())) ? this.getEntities() : null); strategy.appendField(locator, this, "entities", buffer, theEntities); } { List theClassifications; theClassifications = (((this.classifications != null) && (!this.classifications .isEmpty())) ? this.getClassifications() : null); strategy.appendField(locator, this, "classifications", buffer, theClassifications); } { List theSoftwarePackages; theSoftwarePackages = (((this.softwarePackages != null) && (!this.softwarePackages .isEmpty())) ? this.getSoftwarePackages() : null); strategy.appendField(locator, this, "softwarePackages", buffer, theSoftwarePackages); } { List theDigitalSignatures; theDigitalSignatures = (((this.digitalSignatures != null) && (!this.digitalSignatures .isEmpty())) ? this.getDigitalSignatures() : null); strategy.appendField(locator, this, "digitalSignatures", buffer, theDigitalSignatures); } { List theTaggants; theTaggants = (((this.taggants != null) && (!this.taggants .isEmpty())) ? this.getTaggants() : null); strategy.appendField(locator, this, "taggants", buffer, theTaggants); } 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 name="relationship" type="{http://xml/metadataSharing.xsd}relationship" maxOccurs="unbounded"/>
	 *       </sequence>
	 *     </restriction>
	 *   </complexContent>
	 * </complexType>
	 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "relationships" }) public static class Relationships implements Equals, HashCode, ToString { @XmlElement(name = "relationship", required = true) protected List relationships; /** * Default no-arg constructor * */ public Relationships() { super(); } /** * Fully-initialising value constructor * */ public Relationships(final List relationships) { this.relationships = relationships; } /** * 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 Relationship } * * */ public List getRelationships() { if (relationships == null) { relationships = new ArrayList(); } return this.relationships; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MalwareMetaData.Relationships)) { return false; } if (this == object) { return true; } final MalwareMetaData.Relationships that = ((MalwareMetaData.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 MalwareMetaData.Relationships withRelationships( Relationship... values) { if (values != null) { for (Relationship value : values) { getRelationships().add(value); } } return this; } public MalwareMetaData.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; } } /** * 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, MalwareMetaData.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 MalwareMetaData instance for XML String * * @param text * XML String for the document * @return The MalwareMetaData instance for the passed XML String */ public static MalwareMetaData fromXMLString(String text) { JAXBContext jaxbContext; try { jaxbContext = JAXBContext.newInstance(MalwareMetaData.class .getPackage().getName()); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setSchema(STIXSchema.getInstance().getSchema()); unmarshaller.setEventHandler(new ValidationEventHandler()); StreamSource streamSource = new StreamSource(new StringReader(text)); return (MalwareMetaData) unmarshaller.unmarshal(streamSource); } catch (JAXBException e) { throw new RuntimeException(e); } } /** * Validates the XML representation of this MalwareMetaData instance * Returning true indicating a successful validation, false if not. * * @return boolean */ public boolean validate() { return STIXSchema.getInstance().validate(toXMLString()); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy