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

xml.metadatasharing.FileObject Maven / Gradle / Ivy

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 xml.metadatasharing;

import java.io.StringReader;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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;
import org.xml.sax.SAXException;

/**
 * 
 *     Object definition for files. The required attribute is the id, which needs to be globally unique. 
 *     By convention, the value used is a hash, the stronger the better. 
 *     
 *     The choice should be: use sha256 if you have it, if not use sha1, if not use md5.
 *   
 *     Other hashes and file sizes are recorded in the elements. 
 * 
 *     File names are put in as properties.
 *     
 *    
 * 
 * 

Java class for fileObject complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="fileObject">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="md5" type="{http://www.w3.org/2001/XMLSchema}hexBinary"/>
 *         <element name="sha1" type="{http://www.w3.org/2001/XMLSchema}hexBinary" minOccurs="0"/>
 *         <element name="sha256" type="{http://www.w3.org/2001/XMLSchema}hexBinary" minOccurs="0"/>
 *         <element name="sha512" type="{http://www.w3.org/2001/XMLSchema}hexBinary" minOccurs="0"/>
 *         <element name="size" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="crc32" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="fileType" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="extraHash" maxOccurs="unbounded" minOccurs="0">
 *           <complexType>
 *             <simpleContent>
 *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
 *                 <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *               </extension>
 *             </simpleContent>
 *           </complexType>
 *         </element>
 *         <element name="filename" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="normalizedNativePath" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="filenameWithinInstaller" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="folderWithinInstaller" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="vendor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="internalName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="language" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="productName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="fileVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="productVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="developmentEnvironment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="checksum" type="{http://www.w3.org/2001/XMLSchema}hexBinary" minOccurs="0"/>
 *         <element name="architecture" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="buildTimeDateStamp" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="compilerVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="linkerVersion" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
 *         <element name="minOSVersionCPE" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="numberOfSections" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="MIMEType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="requiredPrivilege" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="digitalSignature" type="{http://xml/metadataSharing.xsd}digitalSignatureObject" minOccurs="0"/>
 *         <element name="taggant" type="{http://xml/metadataSharing.xsd}taggantObject" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}hexBinary" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "fileObject", propOrder = { "md5", "sha1", "sha256", "sha512", "size", "crc32", "fileTypes", "extraHashes", "filenames", "normalizedNativePaths", "filenameWithinInstallers", "folderWithinInstallers", "vendor", "internalNames", "languages", "productName", "fileVersion", "productVersion", "developmentEnvironment", "checksum", "architecture", "buildTimeDateStamp", "compilerVersion", "linkerVersion", "minOSVersionCPE", "numberOfSections", "mimeType", "requiredPrivilege", "digitalSignature", "taggant" }) public class FileObject implements Equals, HashCode, ToString { @XmlElement(required = true, type = String.class) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] md5; @XmlElement(type = String.class) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] sha1; @XmlElement(type = String.class) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] sha256; @XmlElement(type = String.class) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] sha512; protected Integer size; protected String crc32; @XmlElement(name = "fileType") protected List fileTypes; @XmlElement(name = "extraHash") protected List extraHashes; @XmlElement(name = "filename") protected List filenames; @XmlElement(name = "normalizedNativePath") protected List normalizedNativePaths; @XmlElement(name = "filenameWithinInstaller") protected List filenameWithinInstallers; @XmlElement(name = "folderWithinInstaller") protected List folderWithinInstallers; protected String vendor; @XmlElement(name = "internalName") protected List internalNames; @XmlElement(name = "language") protected List languages; protected String productName; protected String fileVersion; protected String productVersion; protected String developmentEnvironment; @XmlElement(type = String.class) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] checksum; protected String architecture; @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar buildTimeDateStamp; protected String compilerVersion; protected Float linkerVersion; protected String minOSVersionCPE; protected Integer numberOfSections; @XmlElement(name = "MIMEType") protected String mimeType; protected String requiredPrivilege; protected DigitalSignatureObject digitalSignature; protected TaggantObject taggant; @XmlAttribute(name = "id", required = true) @XmlJavaTypeAdapter(HexBinaryAdapter.class) @XmlSchemaType(name = "hexBinary") protected byte[] id; /** * Default no-arg constructor * */ public FileObject() { super(); } /** * Fully-initialising value constructor * */ public FileObject(final byte[] md5, final byte[] sha1, final byte[] sha256, final byte[] sha512, final Integer size, final String crc32, final List fileTypes, final List extraHashes, final List filenames, final List normalizedNativePaths, final List filenameWithinInstallers, final List folderWithinInstallers, final String vendor, final List internalNames, final List languages, final String productName, final String fileVersion, final String productVersion, final String developmentEnvironment, final byte[] checksum, final String architecture, final XMLGregorianCalendar buildTimeDateStamp, final String compilerVersion, final Float linkerVersion, final String minOSVersionCPE, final Integer numberOfSections, final String mimeType, final String requiredPrivilege, final DigitalSignatureObject digitalSignature, final TaggantObject taggant, final byte[] id) { this.md5 = md5; this.sha1 = sha1; this.sha256 = sha256; this.sha512 = sha512; this.size = size; this.crc32 = crc32; this.fileTypes = fileTypes; this.extraHashes = extraHashes; this.filenames = filenames; this.normalizedNativePaths = normalizedNativePaths; this.filenameWithinInstallers = filenameWithinInstallers; this.folderWithinInstallers = folderWithinInstallers; this.vendor = vendor; this.internalNames = internalNames; this.languages = languages; this.productName = productName; this.fileVersion = fileVersion; this.productVersion = productVersion; this.developmentEnvironment = developmentEnvironment; this.checksum = checksum; this.architecture = architecture; this.buildTimeDateStamp = buildTimeDateStamp; this.compilerVersion = compilerVersion; this.linkerVersion = linkerVersion; this.minOSVersionCPE = minOSVersionCPE; this.numberOfSections = numberOfSections; this.mimeType = mimeType; this.requiredPrivilege = requiredPrivilege; this.digitalSignature = digitalSignature; this.taggant = taggant; this.id = id; } /** * Gets the value of the md5 property. * * @return * possible object is * {@link String } * */ public byte[] getMd5() { return md5; } /** * Sets the value of the md5 property. * * @param value * allowed object is * {@link String } * */ public void setMd5(byte[] value) { this.md5 = value; } /** * Gets the value of the sha1 property. * * @return * possible object is * {@link String } * */ public byte[] getSha1() { return sha1; } /** * Sets the value of the sha1 property. * * @param value * allowed object is * {@link String } * */ public void setSha1(byte[] value) { this.sha1 = value; } /** * Gets the value of the sha256 property. * * @return * possible object is * {@link String } * */ public byte[] getSha256() { return sha256; } /** * Sets the value of the sha256 property. * * @param value * allowed object is * {@link String } * */ public void setSha256(byte[] value) { this.sha256 = value; } /** * Gets the value of the sha512 property. * * @return * possible object is * {@link String } * */ public byte[] getSha512() { return sha512; } /** * Sets the value of the sha512 property. * * @param value * allowed object is * {@link String } * */ public void setSha512(byte[] value) { this.sha512 = value; } /** * Gets the value of the size property. * * @return * possible object is * {@link Integer } * */ public Integer getSize() { return size; } /** * Sets the value of the size property. * * @param value * allowed object is * {@link Integer } * */ public void setSize(Integer value) { this.size = value; } /** * Gets the value of the crc32 property. * * @return * possible object is * {@link String } * */ public String getCrc32() { return crc32; } /** * Sets the value of the crc32 property. * * @param value * allowed object is * {@link String } * */ public void setCrc32(String value) { this.crc32 = value; } /** * Gets the value of the fileTypes 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 fileTypes property. * *

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

	 *    getFileTypes().add(newItem);
	 * 
* * *

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

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

	 *    getExtraHashes().add(newItem);
	 * 
* * *

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

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

	 *    getFilenames().add(newItem);
	 * 
* * *

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

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

	 *    getNormalizedNativePaths().add(newItem);
	 * 
* * *

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

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

	 *    getFilenameWithinInstallers().add(newItem);
	 * 
* * *

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

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

	 *    getFolderWithinInstallers().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } * * */ public List getFolderWithinInstallers() { if (folderWithinInstallers == null) { folderWithinInstallers = new ArrayList(); } return this.folderWithinInstallers; } /** * Gets the value of the vendor property. * * @return * possible object is * {@link String } * */ public String getVendor() { return vendor; } /** * Sets the value of the vendor property. * * @param value * allowed object is * {@link String } * */ public void setVendor(String value) { this.vendor = value; } /** * Gets the value of the internalNames 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 internalNames property. * *

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

	 *    getInternalNames().add(newItem);
	 * 
* * *

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

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

	 *    getLanguages().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } * * */ public List getLanguages() { if (languages == null) { languages = new ArrayList(); } return this.languages; } /** * Gets the value of the productName property. * * @return * possible object is * {@link String } * */ public String getProductName() { return productName; } /** * Sets the value of the productName property. * * @param value * allowed object is * {@link String } * */ public void setProductName(String value) { this.productName = value; } /** * Gets the value of the fileVersion property. * * @return * possible object is * {@link String } * */ public String getFileVersion() { return fileVersion; } /** * Sets the value of the fileVersion property. * * @param value * allowed object is * {@link String } * */ public void setFileVersion(String value) { this.fileVersion = value; } /** * Gets the value of the productVersion property. * * @return * possible object is * {@link String } * */ public String getProductVersion() { return productVersion; } /** * Sets the value of the productVersion property. * * @param value * allowed object is * {@link String } * */ public void setProductVersion(String value) { this.productVersion = value; } /** * Gets the value of the developmentEnvironment property. * * @return * possible object is * {@link String } * */ public String getDevelopmentEnvironment() { return developmentEnvironment; } /** * Sets the value of the developmentEnvironment property. * * @param value * allowed object is * {@link String } * */ public void setDevelopmentEnvironment(String value) { this.developmentEnvironment = value; } /** * Gets the value of the checksum property. * * @return * possible object is * {@link String } * */ public byte[] getChecksum() { return checksum; } /** * Sets the value of the checksum property. * * @param value * allowed object is * {@link String } * */ public void setChecksum(byte[] value) { this.checksum = value; } /** * Gets the value of the architecture property. * * @return * possible object is * {@link String } * */ public String getArchitecture() { return architecture; } /** * Sets the value of the architecture property. * * @param value * allowed object is * {@link String } * */ public void setArchitecture(String value) { this.architecture = value; } /** * Gets the value of the buildTimeDateStamp property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getBuildTimeDateStamp() { return buildTimeDateStamp; } /** * Sets the value of the buildTimeDateStamp property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setBuildTimeDateStamp(XMLGregorianCalendar value) { this.buildTimeDateStamp = value; } /** * Gets the value of the compilerVersion property. * * @return * possible object is * {@link String } * */ public String getCompilerVersion() { return compilerVersion; } /** * Sets the value of the compilerVersion property. * * @param value * allowed object is * {@link String } * */ public void setCompilerVersion(String value) { this.compilerVersion = value; } /** * Gets the value of the linkerVersion property. * * @return * possible object is * {@link Float } * */ public Float getLinkerVersion() { return linkerVersion; } /** * Sets the value of the linkerVersion property. * * @param value * allowed object is * {@link Float } * */ public void setLinkerVersion(Float value) { this.linkerVersion = value; } /** * Gets the value of the minOSVersionCPE property. * * @return * possible object is * {@link String } * */ public String getMinOSVersionCPE() { return minOSVersionCPE; } /** * Sets the value of the minOSVersionCPE property. * * @param value * allowed object is * {@link String } * */ public void setMinOSVersionCPE(String value) { this.minOSVersionCPE = value; } /** * Gets the value of the numberOfSections property. * * @return * possible object is * {@link Integer } * */ public Integer getNumberOfSections() { return numberOfSections; } /** * Sets the value of the numberOfSections property. * * @param value * allowed object is * {@link Integer } * */ public void setNumberOfSections(Integer value) { this.numberOfSections = value; } /** * Gets the value of the mimeType property. * * @return * possible object is * {@link String } * */ public String getMIMEType() { return mimeType; } /** * Sets the value of the mimeType property. * * @param value * allowed object is * {@link String } * */ public void setMIMEType(String value) { this.mimeType = value; } /** * Gets the value of the requiredPrivilege property. * * @return * possible object is * {@link String } * */ public String getRequiredPrivilege() { return requiredPrivilege; } /** * Sets the value of the requiredPrivilege property. * * @param value * allowed object is * {@link String } * */ public void setRequiredPrivilege(String value) { this.requiredPrivilege = value; } /** * Gets the value of the digitalSignature property. * * @return * possible object is * {@link DigitalSignatureObject } * */ public DigitalSignatureObject getDigitalSignature() { return digitalSignature; } /** * Sets the value of the digitalSignature property. * * @param value * allowed object is * {@link DigitalSignatureObject } * */ public void setDigitalSignature(DigitalSignatureObject value) { this.digitalSignature = value; } /** * Gets the value of the taggant property. * * @return * possible object is * {@link TaggantObject } * */ public TaggantObject getTaggant() { return taggant; } /** * Sets the value of the taggant property. * * @param value * allowed object is * {@link TaggantObject } * */ public void setTaggant(TaggantObject value) { this.taggant = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public byte[] getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(byte[] value) { this.id = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof FileObject)) { return false; } if (this == object) { return true; } final FileObject that = ((FileObject) object); { byte[] lhsMd5; lhsMd5 = this.getMd5(); byte[] rhsMd5; rhsMd5 = that.getMd5(); if (!strategy.equals( LocatorUtils.property(thisLocator, "md5", lhsMd5), LocatorUtils.property(thatLocator, "md5", rhsMd5), lhsMd5, rhsMd5)) { return false; } } { byte[] lhsSha1; lhsSha1 = this.getSha1(); byte[] rhsSha1; rhsSha1 = that.getSha1(); if (!strategy.equals( LocatorUtils.property(thisLocator, "sha1", lhsSha1), LocatorUtils.property(thatLocator, "sha1", rhsSha1), lhsSha1, rhsSha1)) { return false; } } { byte[] lhsSha256; lhsSha256 = this.getSha256(); byte[] rhsSha256; rhsSha256 = that.getSha256(); if (!strategy.equals( LocatorUtils.property(thisLocator, "sha256", lhsSha256), LocatorUtils.property(thatLocator, "sha256", rhsSha256), lhsSha256, rhsSha256)) { return false; } } { byte[] lhsSha512; lhsSha512 = this.getSha512(); byte[] rhsSha512; rhsSha512 = that.getSha512(); if (!strategy.equals( LocatorUtils.property(thisLocator, "sha512", lhsSha512), LocatorUtils.property(thatLocator, "sha512", rhsSha512), lhsSha512, rhsSha512)) { return false; } } { Integer lhsSize; lhsSize = this.getSize(); Integer rhsSize; rhsSize = that.getSize(); if (!strategy.equals( LocatorUtils.property(thisLocator, "size", lhsSize), LocatorUtils.property(thatLocator, "size", rhsSize), lhsSize, rhsSize)) { return false; } } { String lhsCrc32; lhsCrc32 = this.getCrc32(); String rhsCrc32; rhsCrc32 = that.getCrc32(); if (!strategy.equals( LocatorUtils.property(thisLocator, "crc32", lhsCrc32), LocatorUtils.property(thatLocator, "crc32", rhsCrc32), lhsCrc32, rhsCrc32)) { return false; } } { List lhsFileTypes; lhsFileTypes = (((this.fileTypes != null) && (!this.fileTypes .isEmpty())) ? this.getFileTypes() : null); List rhsFileTypes; rhsFileTypes = (((that.fileTypes != null) && (!that.fileTypes .isEmpty())) ? that.getFileTypes() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "fileTypes", lhsFileTypes), LocatorUtils.property( thatLocator, "fileTypes", rhsFileTypes), lhsFileTypes, rhsFileTypes)) { return false; } } { List lhsExtraHashes; lhsExtraHashes = (((this.extraHashes != null) && (!this.extraHashes .isEmpty())) ? this.getExtraHashes() : null); List rhsExtraHashes; rhsExtraHashes = (((that.extraHashes != null) && (!that.extraHashes .isEmpty())) ? that.getExtraHashes() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "extraHashes", lhsExtraHashes), LocatorUtils.property( thatLocator, "extraHashes", rhsExtraHashes), lhsExtraHashes, rhsExtraHashes)) { return false; } } { List lhsFilenames; lhsFilenames = (((this.filenames != null) && (!this.filenames .isEmpty())) ? this.getFilenames() : null); List rhsFilenames; rhsFilenames = (((that.filenames != null) && (!that.filenames .isEmpty())) ? that.getFilenames() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "filenames", lhsFilenames), LocatorUtils.property( thatLocator, "filenames", rhsFilenames), lhsFilenames, rhsFilenames)) { return false; } } { List lhsNormalizedNativePaths; lhsNormalizedNativePaths = (((this.normalizedNativePaths != null) && (!this.normalizedNativePaths .isEmpty())) ? this.getNormalizedNativePaths() : null); List rhsNormalizedNativePaths; rhsNormalizedNativePaths = (((that.normalizedNativePaths != null) && (!that.normalizedNativePaths .isEmpty())) ? that.getNormalizedNativePaths() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "normalizedNativePaths", lhsNormalizedNativePaths), LocatorUtils.property(thatLocator, "normalizedNativePaths", rhsNormalizedNativePaths), lhsNormalizedNativePaths, rhsNormalizedNativePaths)) { return false; } } { List lhsFilenameWithinInstallers; lhsFilenameWithinInstallers = (((this.filenameWithinInstallers != null) && (!this.filenameWithinInstallers .isEmpty())) ? this.getFilenameWithinInstallers() : null); List rhsFilenameWithinInstallers; rhsFilenameWithinInstallers = (((that.filenameWithinInstallers != null) && (!that.filenameWithinInstallers .isEmpty())) ? that.getFilenameWithinInstallers() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "filenameWithinInstallers", lhsFilenameWithinInstallers), LocatorUtils.property(thatLocator, "filenameWithinInstallers", rhsFilenameWithinInstallers), lhsFilenameWithinInstallers, rhsFilenameWithinInstallers)) { return false; } } { List lhsFolderWithinInstallers; lhsFolderWithinInstallers = (((this.folderWithinInstallers != null) && (!this.folderWithinInstallers .isEmpty())) ? this.getFolderWithinInstallers() : null); List rhsFolderWithinInstallers; rhsFolderWithinInstallers = (((that.folderWithinInstallers != null) && (!that.folderWithinInstallers .isEmpty())) ? that.getFolderWithinInstallers() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "folderWithinInstallers", lhsFolderWithinInstallers), LocatorUtils .property(thatLocator, "folderWithinInstallers", rhsFolderWithinInstallers), lhsFolderWithinInstallers, rhsFolderWithinInstallers)) { return false; } } { String lhsVendor; lhsVendor = this.getVendor(); String rhsVendor; rhsVendor = that.getVendor(); if (!strategy.equals( LocatorUtils.property(thisLocator, "vendor", lhsVendor), LocatorUtils.property(thatLocator, "vendor", rhsVendor), lhsVendor, rhsVendor)) { return false; } } { List lhsInternalNames; lhsInternalNames = (((this.internalNames != null) && (!this.internalNames .isEmpty())) ? this.getInternalNames() : null); List rhsInternalNames; rhsInternalNames = (((that.internalNames != null) && (!that.internalNames .isEmpty())) ? that.getInternalNames() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "internalNames", lhsInternalNames), LocatorUtils.property( thatLocator, "internalNames", rhsInternalNames), lhsInternalNames, rhsInternalNames)) { return false; } } { List lhsLanguages; lhsLanguages = (((this.languages != null) && (!this.languages .isEmpty())) ? this.getLanguages() : null); List rhsLanguages; rhsLanguages = (((that.languages != null) && (!that.languages .isEmpty())) ? that.getLanguages() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "languages", lhsLanguages), LocatorUtils.property( thatLocator, "languages", rhsLanguages), lhsLanguages, rhsLanguages)) { return false; } } { String lhsProductName; lhsProductName = this.getProductName(); String rhsProductName; rhsProductName = that.getProductName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "productName", lhsProductName), LocatorUtils.property( thatLocator, "productName", rhsProductName), lhsProductName, rhsProductName)) { return false; } } { String lhsFileVersion; lhsFileVersion = this.getFileVersion(); String rhsFileVersion; rhsFileVersion = that.getFileVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "fileVersion", lhsFileVersion), LocatorUtils.property( thatLocator, "fileVersion", rhsFileVersion), lhsFileVersion, rhsFileVersion)) { return false; } } { String lhsProductVersion; lhsProductVersion = this.getProductVersion(); String rhsProductVersion; rhsProductVersion = that.getProductVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "productVersion", lhsProductVersion), LocatorUtils.property(thatLocator, "productVersion", rhsProductVersion), lhsProductVersion, rhsProductVersion)) { return false; } } { String lhsDevelopmentEnvironment; lhsDevelopmentEnvironment = this.getDevelopmentEnvironment(); String rhsDevelopmentEnvironment; rhsDevelopmentEnvironment = that.getDevelopmentEnvironment(); if (!strategy.equals(LocatorUtils.property(thisLocator, "developmentEnvironment", lhsDevelopmentEnvironment), LocatorUtils .property(thatLocator, "developmentEnvironment", rhsDevelopmentEnvironment), lhsDevelopmentEnvironment, rhsDevelopmentEnvironment)) { return false; } } { byte[] lhsChecksum; lhsChecksum = this.getChecksum(); byte[] rhsChecksum; rhsChecksum = that.getChecksum(); if (!strategy .equals(LocatorUtils.property(thisLocator, "checksum", lhsChecksum), LocatorUtils.property(thatLocator, "checksum", rhsChecksum), lhsChecksum, rhsChecksum)) { return false; } } { String lhsArchitecture; lhsArchitecture = this.getArchitecture(); String rhsArchitecture; rhsArchitecture = that.getArchitecture(); if (!strategy.equals(LocatorUtils.property(thisLocator, "architecture", lhsArchitecture), LocatorUtils.property( thatLocator, "architecture", rhsArchitecture), lhsArchitecture, rhsArchitecture)) { return false; } } { XMLGregorianCalendar lhsBuildTimeDateStamp; lhsBuildTimeDateStamp = this.getBuildTimeDateStamp(); XMLGregorianCalendar rhsBuildTimeDateStamp; rhsBuildTimeDateStamp = that.getBuildTimeDateStamp(); if (!strategy.equals(LocatorUtils.property(thisLocator, "buildTimeDateStamp", lhsBuildTimeDateStamp), LocatorUtils .property(thatLocator, "buildTimeDateStamp", rhsBuildTimeDateStamp), lhsBuildTimeDateStamp, rhsBuildTimeDateStamp)) { return false; } } { String lhsCompilerVersion; lhsCompilerVersion = this.getCompilerVersion(); String rhsCompilerVersion; rhsCompilerVersion = that.getCompilerVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "compilerVersion", lhsCompilerVersion), LocatorUtils .property(thatLocator, "compilerVersion", rhsCompilerVersion), lhsCompilerVersion, rhsCompilerVersion)) { return false; } } { Float lhsLinkerVersion; lhsLinkerVersion = this.getLinkerVersion(); Float rhsLinkerVersion; rhsLinkerVersion = that.getLinkerVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "linkerVersion", lhsLinkerVersion), LocatorUtils.property( thatLocator, "linkerVersion", rhsLinkerVersion), lhsLinkerVersion, rhsLinkerVersion)) { return false; } } { String lhsMinOSVersionCPE; lhsMinOSVersionCPE = this.getMinOSVersionCPE(); String rhsMinOSVersionCPE; rhsMinOSVersionCPE = that.getMinOSVersionCPE(); if (!strategy.equals(LocatorUtils.property(thisLocator, "minOSVersionCPE", lhsMinOSVersionCPE), LocatorUtils .property(thatLocator, "minOSVersionCPE", rhsMinOSVersionCPE), lhsMinOSVersionCPE, rhsMinOSVersionCPE)) { return false; } } { Integer lhsNumberOfSections; lhsNumberOfSections = this.getNumberOfSections(); Integer rhsNumberOfSections; rhsNumberOfSections = that.getNumberOfSections(); if (!strategy.equals(LocatorUtils.property(thisLocator, "numberOfSections", lhsNumberOfSections), LocatorUtils .property(thatLocator, "numberOfSections", rhsNumberOfSections), lhsNumberOfSections, rhsNumberOfSections)) { return false; } } { String lhsMIMEType; lhsMIMEType = this.getMIMEType(); String rhsMIMEType; rhsMIMEType = that.getMIMEType(); if (!strategy .equals(LocatorUtils.property(thisLocator, "mimeType", lhsMIMEType), LocatorUtils.property(thatLocator, "mimeType", rhsMIMEType), lhsMIMEType, rhsMIMEType)) { return false; } } { String lhsRequiredPrivilege; lhsRequiredPrivilege = this.getRequiredPrivilege(); String rhsRequiredPrivilege; rhsRequiredPrivilege = that.getRequiredPrivilege(); if (!strategy.equals(LocatorUtils.property(thisLocator, "requiredPrivilege", lhsRequiredPrivilege), LocatorUtils .property(thatLocator, "requiredPrivilege", rhsRequiredPrivilege), lhsRequiredPrivilege, rhsRequiredPrivilege)) { return false; } } { DigitalSignatureObject lhsDigitalSignature; lhsDigitalSignature = this.getDigitalSignature(); DigitalSignatureObject rhsDigitalSignature; rhsDigitalSignature = that.getDigitalSignature(); if (!strategy.equals(LocatorUtils.property(thisLocator, "digitalSignature", lhsDigitalSignature), LocatorUtils .property(thatLocator, "digitalSignature", rhsDigitalSignature), lhsDigitalSignature, rhsDigitalSignature)) { return false; } } { TaggantObject lhsTaggant; lhsTaggant = this.getTaggant(); TaggantObject rhsTaggant; rhsTaggant = that.getTaggant(); if (!strategy.equals( LocatorUtils.property(thisLocator, "taggant", lhsTaggant), LocatorUtils.property(thatLocator, "taggant", rhsTaggant), lhsTaggant, rhsTaggant)) { return false; } } { byte[] lhsId; lhsId = this.getId(); byte[] 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; { byte[] theMd5; theMd5 = this.getMd5(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "md5", theMd5), currentHashCode, theMd5); } { byte[] theSha1; theSha1 = this.getSha1(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "sha1", theSha1), currentHashCode, theSha1); } { byte[] theSha256; theSha256 = this.getSha256(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "sha256", theSha256), currentHashCode, theSha256); } { byte[] theSha512; theSha512 = this.getSha512(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "sha512", theSha512), currentHashCode, theSha512); } { Integer theSize; theSize = this.getSize(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "size", theSize), currentHashCode, theSize); } { String theCrc32; theCrc32 = this.getCrc32(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "crc32", theCrc32), currentHashCode, theCrc32); } { List theFileTypes; theFileTypes = (((this.fileTypes != null) && (!this.fileTypes .isEmpty())) ? this.getFileTypes() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "fileTypes", theFileTypes), currentHashCode, theFileTypes); } { List theExtraHashes; theExtraHashes = (((this.extraHashes != null) && (!this.extraHashes .isEmpty())) ? this.getExtraHashes() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "extraHashes", theExtraHashes), currentHashCode, theExtraHashes); } { List theFilenames; theFilenames = (((this.filenames != null) && (!this.filenames .isEmpty())) ? this.getFilenames() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "filenames", theFilenames), currentHashCode, theFilenames); } { List theNormalizedNativePaths; theNormalizedNativePaths = (((this.normalizedNativePaths != null) && (!this.normalizedNativePaths .isEmpty())) ? this.getNormalizedNativePaths() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "normalizedNativePaths", theNormalizedNativePaths), currentHashCode, theNormalizedNativePaths); } { List theFilenameWithinInstallers; theFilenameWithinInstallers = (((this.filenameWithinInstallers != null) && (!this.filenameWithinInstallers .isEmpty())) ? this.getFilenameWithinInstallers() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "filenameWithinInstallers", theFilenameWithinInstallers), currentHashCode, theFilenameWithinInstallers); } { List theFolderWithinInstallers; theFolderWithinInstallers = (((this.folderWithinInstallers != null) && (!this.folderWithinInstallers .isEmpty())) ? this.getFolderWithinInstallers() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "folderWithinInstallers", theFolderWithinInstallers), currentHashCode, theFolderWithinInstallers); } { String theVendor; theVendor = this.getVendor(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "vendor", theVendor), currentHashCode, theVendor); } { List theInternalNames; theInternalNames = (((this.internalNames != null) && (!this.internalNames .isEmpty())) ? this.getInternalNames() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "internalNames", theInternalNames), currentHashCode, theInternalNames); } { List theLanguages; theLanguages = (((this.languages != null) && (!this.languages .isEmpty())) ? this.getLanguages() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "languages", theLanguages), currentHashCode, theLanguages); } { String theProductName; theProductName = this.getProductName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "productName", theProductName), currentHashCode, theProductName); } { String theFileVersion; theFileVersion = this.getFileVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fileVersion", theFileVersion), currentHashCode, theFileVersion); } { String theProductVersion; theProductVersion = this.getProductVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "productVersion", theProductVersion), currentHashCode, theProductVersion); } { String theDevelopmentEnvironment; theDevelopmentEnvironment = this.getDevelopmentEnvironment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "developmentEnvironment", theDevelopmentEnvironment), currentHashCode, theDevelopmentEnvironment); } { byte[] theChecksum; theChecksum = this.getChecksum(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "checksum", theChecksum), currentHashCode, theChecksum); } { String theArchitecture; theArchitecture = this.getArchitecture(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "architecture", theArchitecture), currentHashCode, theArchitecture); } { XMLGregorianCalendar theBuildTimeDateStamp; theBuildTimeDateStamp = this.getBuildTimeDateStamp(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "buildTimeDateStamp", theBuildTimeDateStamp), currentHashCode, theBuildTimeDateStamp); } { String theCompilerVersion; theCompilerVersion = this.getCompilerVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "compilerVersion", theCompilerVersion), currentHashCode, theCompilerVersion); } { Float theLinkerVersion; theLinkerVersion = this.getLinkerVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "linkerVersion", theLinkerVersion), currentHashCode, theLinkerVersion); } { String theMinOSVersionCPE; theMinOSVersionCPE = this.getMinOSVersionCPE(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "minOSVersionCPE", theMinOSVersionCPE), currentHashCode, theMinOSVersionCPE); } { Integer theNumberOfSections; theNumberOfSections = this.getNumberOfSections(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "numberOfSections", theNumberOfSections), currentHashCode, theNumberOfSections); } { String theMIMEType; theMIMEType = this.getMIMEType(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "mimeType", theMIMEType), currentHashCode, theMIMEType); } { String theRequiredPrivilege; theRequiredPrivilege = this.getRequiredPrivilege(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "requiredPrivilege", theRequiredPrivilege), currentHashCode, theRequiredPrivilege); } { DigitalSignatureObject theDigitalSignature; theDigitalSignature = this.getDigitalSignature(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "digitalSignature", theDigitalSignature), currentHashCode, theDigitalSignature); } { TaggantObject theTaggant; theTaggant = this.getTaggant(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "taggant", theTaggant), currentHashCode, theTaggant); } { byte[] 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 FileObject withMd5(byte[] value) { setMd5(value); return this; } public FileObject withSha1(byte[] value) { setSha1(value); return this; } public FileObject withSha256(byte[] value) { setSha256(value); return this; } public FileObject withSha512(byte[] value) { setSha512(value); return this; } public FileObject withSize(Integer value) { setSize(value); return this; } public FileObject withCrc32(String value) { setCrc32(value); return this; } public FileObject withFileTypes(String... values) { if (values != null) { for (String value : values) { getFileTypes().add(value); } } return this; } public FileObject withFileTypes(Collection values) { if (values != null) { getFileTypes().addAll(values); } return this; } public FileObject withExtraHashes(FileObject.ExtraHash... values) { if (values != null) { for (FileObject.ExtraHash value : values) { getExtraHashes().add(value); } } return this; } public FileObject withExtraHashes(Collection values) { if (values != null) { getExtraHashes().addAll(values); } return this; } public FileObject withFilenames(String... values) { if (values != null) { for (String value : values) { getFilenames().add(value); } } return this; } public FileObject withFilenames(Collection values) { if (values != null) { getFilenames().addAll(values); } return this; } public FileObject withNormalizedNativePaths(String... values) { if (values != null) { for (String value : values) { getNormalizedNativePaths().add(value); } } return this; } public FileObject withNormalizedNativePaths(Collection values) { if (values != null) { getNormalizedNativePaths().addAll(values); } return this; } public FileObject withFilenameWithinInstallers(String... values) { if (values != null) { for (String value : values) { getFilenameWithinInstallers().add(value); } } return this; } public FileObject withFilenameWithinInstallers(Collection values) { if (values != null) { getFilenameWithinInstallers().addAll(values); } return this; } public FileObject withFolderWithinInstallers(String... values) { if (values != null) { for (String value : values) { getFolderWithinInstallers().add(value); } } return this; } public FileObject withFolderWithinInstallers(Collection values) { if (values != null) { getFolderWithinInstallers().addAll(values); } return this; } public FileObject withVendor(String value) { setVendor(value); return this; } public FileObject withInternalNames(String... values) { if (values != null) { for (String value : values) { getInternalNames().add(value); } } return this; } public FileObject withInternalNames(Collection values) { if (values != null) { getInternalNames().addAll(values); } return this; } public FileObject withLanguages(String... values) { if (values != null) { for (String value : values) { getLanguages().add(value); } } return this; } public FileObject withLanguages(Collection values) { if (values != null) { getLanguages().addAll(values); } return this; } public FileObject withProductName(String value) { setProductName(value); return this; } public FileObject withFileVersion(String value) { setFileVersion(value); return this; } public FileObject withProductVersion(String value) { setProductVersion(value); return this; } public FileObject withDevelopmentEnvironment(String value) { setDevelopmentEnvironment(value); return this; } public FileObject withChecksum(byte[] value) { setChecksum(value); return this; } public FileObject withArchitecture(String value) { setArchitecture(value); return this; } public FileObject withBuildTimeDateStamp(XMLGregorianCalendar value) { setBuildTimeDateStamp(value); return this; } public FileObject withCompilerVersion(String value) { setCompilerVersion(value); return this; } public FileObject withLinkerVersion(Float value) { setLinkerVersion(value); return this; } public FileObject withMinOSVersionCPE(String value) { setMinOSVersionCPE(value); return this; } public FileObject withNumberOfSections(Integer value) { setNumberOfSections(value); return this; } public FileObject withMIMEType(String value) { setMIMEType(value); return this; } public FileObject withRequiredPrivilege(String value) { setRequiredPrivilege(value); return this; } public FileObject withDigitalSignature(DigitalSignatureObject value) { setDigitalSignature(value); return this; } public FileObject withTaggant(TaggantObject value) { setTaggant(value); return this; } public FileObject withId(byte[] 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) { { byte[] theMd5; theMd5 = this.getMd5(); strategy.appendField(locator, this, "md5", buffer, theMd5); } { byte[] theSha1; theSha1 = this.getSha1(); strategy.appendField(locator, this, "sha1", buffer, theSha1); } { byte[] theSha256; theSha256 = this.getSha256(); strategy.appendField(locator, this, "sha256", buffer, theSha256); } { byte[] theSha512; theSha512 = this.getSha512(); strategy.appendField(locator, this, "sha512", buffer, theSha512); } { Integer theSize; theSize = this.getSize(); strategy.appendField(locator, this, "size", buffer, theSize); } { String theCrc32; theCrc32 = this.getCrc32(); strategy.appendField(locator, this, "crc32", buffer, theCrc32); } { List theFileTypes; theFileTypes = (((this.fileTypes != null) && (!this.fileTypes .isEmpty())) ? this.getFileTypes() : null); strategy.appendField(locator, this, "fileTypes", buffer, theFileTypes); } { List theExtraHashes; theExtraHashes = (((this.extraHashes != null) && (!this.extraHashes .isEmpty())) ? this.getExtraHashes() : null); strategy.appendField(locator, this, "extraHashes", buffer, theExtraHashes); } { List theFilenames; theFilenames = (((this.filenames != null) && (!this.filenames .isEmpty())) ? this.getFilenames() : null); strategy.appendField(locator, this, "filenames", buffer, theFilenames); } { List theNormalizedNativePaths; theNormalizedNativePaths = (((this.normalizedNativePaths != null) && (!this.normalizedNativePaths .isEmpty())) ? this.getNormalizedNativePaths() : null); strategy.appendField(locator, this, "normalizedNativePaths", buffer, theNormalizedNativePaths); } { List theFilenameWithinInstallers; theFilenameWithinInstallers = (((this.filenameWithinInstallers != null) && (!this.filenameWithinInstallers .isEmpty())) ? this.getFilenameWithinInstallers() : null); strategy.appendField(locator, this, "filenameWithinInstallers", buffer, theFilenameWithinInstallers); } { List theFolderWithinInstallers; theFolderWithinInstallers = (((this.folderWithinInstallers != null) && (!this.folderWithinInstallers .isEmpty())) ? this.getFolderWithinInstallers() : null); strategy.appendField(locator, this, "folderWithinInstallers", buffer, theFolderWithinInstallers); } { String theVendor; theVendor = this.getVendor(); strategy.appendField(locator, this, "vendor", buffer, theVendor); } { List theInternalNames; theInternalNames = (((this.internalNames != null) && (!this.internalNames .isEmpty())) ? this.getInternalNames() : null); strategy.appendField(locator, this, "internalNames", buffer, theInternalNames); } { List theLanguages; theLanguages = (((this.languages != null) && (!this.languages .isEmpty())) ? this.getLanguages() : null); strategy.appendField(locator, this, "languages", buffer, theLanguages); } { String theProductName; theProductName = this.getProductName(); strategy.appendField(locator, this, "productName", buffer, theProductName); } { String theFileVersion; theFileVersion = this.getFileVersion(); strategy.appendField(locator, this, "fileVersion", buffer, theFileVersion); } { String theProductVersion; theProductVersion = this.getProductVersion(); strategy.appendField(locator, this, "productVersion", buffer, theProductVersion); } { String theDevelopmentEnvironment; theDevelopmentEnvironment = this.getDevelopmentEnvironment(); strategy.appendField(locator, this, "developmentEnvironment", buffer, theDevelopmentEnvironment); } { byte[] theChecksum; theChecksum = this.getChecksum(); strategy.appendField(locator, this, "checksum", buffer, theChecksum); } { String theArchitecture; theArchitecture = this.getArchitecture(); strategy.appendField(locator, this, "architecture", buffer, theArchitecture); } { XMLGregorianCalendar theBuildTimeDateStamp; theBuildTimeDateStamp = this.getBuildTimeDateStamp(); strategy.appendField(locator, this, "buildTimeDateStamp", buffer, theBuildTimeDateStamp); } { String theCompilerVersion; theCompilerVersion = this.getCompilerVersion(); strategy.appendField(locator, this, "compilerVersion", buffer, theCompilerVersion); } { Float theLinkerVersion; theLinkerVersion = this.getLinkerVersion(); strategy.appendField(locator, this, "linkerVersion", buffer, theLinkerVersion); } { String theMinOSVersionCPE; theMinOSVersionCPE = this.getMinOSVersionCPE(); strategy.appendField(locator, this, "minOSVersionCPE", buffer, theMinOSVersionCPE); } { Integer theNumberOfSections; theNumberOfSections = this.getNumberOfSections(); strategy.appendField(locator, this, "numberOfSections", buffer, theNumberOfSections); } { String theMIMEType; theMIMEType = this.getMIMEType(); strategy.appendField(locator, this, "mimeType", buffer, theMIMEType); } { String theRequiredPrivilege; theRequiredPrivilege = this.getRequiredPrivilege(); strategy.appendField(locator, this, "requiredPrivilege", buffer, theRequiredPrivilege); } { DigitalSignatureObject theDigitalSignature; theDigitalSignature = this.getDigitalSignature(); strategy.appendField(locator, this, "digitalSignature", buffer, theDigitalSignature); } { TaggantObject theTaggant; theTaggant = this.getTaggant(); strategy.appendField(locator, this, "taggant", buffer, theTaggant); } { byte[] 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>
	 *   <simpleContent>
	 *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
	 *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
	 *     </extension>
	 *   </simpleContent>
	 * </complexType>
	 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class ExtraHash implements Equals, HashCode, ToString { @XmlValue protected String value; @XmlAttribute(name = "type", required = true) protected String type; /** * Default no-arg constructor * */ public ExtraHash() { super(); } /** * Fully-initialising value constructor * */ public ExtraHash(final String value, final String type) { this.value = value; this.type = type; } /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * 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; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof FileObject.ExtraHash)) { return false; } if (this == object) { return true; } final FileObject.ExtraHash that = ((FileObject.ExtraHash) object); { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals( LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } { 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; } } 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 theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public FileObject.ExtraHash withValue(String value) { setValue(value); return this; } public FileObject.ExtraHash withType(String value) { setType(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 theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } 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, FileObject.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 FileObject instance for XML String * * @param text * XML String for the document * @return The FileObject instance for the passed XML String */ public static FileObject fromXMLString(String text) { JAXBContext jaxbContext; try { jaxbContext = JAXBContext.newInstance(FileObject.class.getPackage() .getName()); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setSchema(STIXSchema.getInstance().getSchema()); unmarshaller.setEventHandler(new ValidationEventHandler()); StreamSource streamSource = new StreamSource(new StringReader(text)); return (FileObject) unmarshaller.unmarshal(streamSource); } catch (JAXBException e) { throw new RuntimeException(e); } } /** * Validates the XML representation of this FileObject 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()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy