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

org.mitre.cybox.objects.WindowsEventLog 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 org.mitre.cybox.objects;

import java.io.StringReader;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.mitre.cybox.common_2.Base64BinaryObjectPropertyType;
import org.mitre.cybox.common_2.CustomPropertiesType;
import org.mitre.cybox.common_2.DateTimeObjectPropertyType;
import org.mitre.cybox.common_2.LongObjectPropertyType;
import org.mitre.cybox.common_2.ObjectPropertiesType;
import org.mitre.cybox.common_2.StringObjectPropertyType;
import org.mitre.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;

/**
 * The WindowsEventLogObjectType type is intended to characterize entries in the Windows event log.
 * 
 * 

Java class for WindowsEventLogObjectType complex type. * *

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

 * <complexType name="WindowsEventLogObjectType">
 *   <complexContent>
 *     <extension base="{http://cybox.mitre.org/common-2}ObjectPropertiesType">
 *       <sequence>
 *         <element name="EID" type="{http://cybox.mitre.org/common-2}LongObjectPropertyType" minOccurs="0"/>
 *         <element name="Type" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Log" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Message" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Category_Num" type="{http://cybox.mitre.org/common-2}LongObjectPropertyType" minOccurs="0"/>
 *         <element name="Category" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Generation_Time" type="{http://cybox.mitre.org/common-2}DateTimeObjectPropertyType" minOccurs="0"/>
 *         <element name="Source" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Machine" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="User" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Blob" type="{http://cybox.mitre.org/common-2}Base64BinaryObjectPropertyType" minOccurs="0"/>
 *         <element name="Correlation_Activity_ID" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Correlation_Related_Activity_ID" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Execution_Process_ID" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Execution_Thread_ID" type="{http://cybox.mitre.org/common-2}StringObjectPropertyType" minOccurs="0"/>
 *         <element name="Index" type="{http://cybox.mitre.org/common-2}LongObjectPropertyType" minOccurs="0"/>
 *         <element name="Reserved" type="{http://cybox.mitre.org/common-2}LongObjectPropertyType" minOccurs="0"/>
 *         <element name="Unformatted_Message_List" type="{http://cybox.mitre.org/objects#WinEventLogObject-2}UnformattedMessageListType" minOccurs="0"/>
 *         <element name="Write_Time" type="{http://cybox.mitre.org/common-2}DateTimeObjectPropertyType" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "WindowsEventLogObjectType", namespace = "http://cybox.mitre.org/objects#WinEventLogObject-2", propOrder = { "eid", "type", "log", "message", "categoryNum", "category", "generationTime", "source", "machine", "user", "blob", "correlationActivityID", "correlationRelatedActivityID", "executionProcessID", "executionThreadID", "index", "reserved", "unformattedMessageList", "writeTime" }) @XmlRootElement(name = "Windows_Event_Log", namespace = "http://cybox.mitre.org/objects#WinEventLogObject-2") public class WindowsEventLog extends ObjectPropertiesType implements Equals, HashCode, ToString { @XmlElement(name = "EID") protected LongObjectPropertyType eid; @XmlElement(name = "Type") protected StringObjectPropertyType type; @XmlElement(name = "Log") protected StringObjectPropertyType log; @XmlElement(name = "Message") protected StringObjectPropertyType message; @XmlElement(name = "Category_Num") protected LongObjectPropertyType categoryNum; @XmlElement(name = "Category") protected StringObjectPropertyType category; @XmlElement(name = "Generation_Time") protected DateTimeObjectPropertyType generationTime; @XmlElement(name = "Source") protected StringObjectPropertyType source; @XmlElement(name = "Machine") protected StringObjectPropertyType machine; @XmlElement(name = "User") protected StringObjectPropertyType user; @XmlElement(name = "Blob") protected Base64BinaryObjectPropertyType blob; @XmlElement(name = "Correlation_Activity_ID") protected StringObjectPropertyType correlationActivityID; @XmlElement(name = "Correlation_Related_Activity_ID") protected StringObjectPropertyType correlationRelatedActivityID; @XmlElement(name = "Execution_Process_ID") protected StringObjectPropertyType executionProcessID; @XmlElement(name = "Execution_Thread_ID") protected StringObjectPropertyType executionThreadID; @XmlElement(name = "Index") protected LongObjectPropertyType index; @XmlElement(name = "Reserved") protected LongObjectPropertyType reserved; @XmlElement(name = "Unformatted_Message_List") protected UnformattedMessageListType unformattedMessageList; @XmlElement(name = "Write_Time") protected DateTimeObjectPropertyType writeTime; /** * Default no-arg constructor * */ public WindowsEventLog() { super(); } /** * Fully-initialising value constructor * */ public WindowsEventLog(final CustomPropertiesType customProperties, final QName objectReference, final LongObjectPropertyType eid, final StringObjectPropertyType type, final StringObjectPropertyType log, final StringObjectPropertyType message, final LongObjectPropertyType categoryNum, final StringObjectPropertyType category, final DateTimeObjectPropertyType generationTime, final StringObjectPropertyType source, final StringObjectPropertyType machine, final StringObjectPropertyType user, final Base64BinaryObjectPropertyType blob, final StringObjectPropertyType correlationActivityID, final StringObjectPropertyType correlationRelatedActivityID, final StringObjectPropertyType executionProcessID, final StringObjectPropertyType executionThreadID, final LongObjectPropertyType index, final LongObjectPropertyType reserved, final UnformattedMessageListType unformattedMessageList, final DateTimeObjectPropertyType writeTime) { super(customProperties, objectReference); this.eid = eid; this.type = type; this.log = log; this.message = message; this.categoryNum = categoryNum; this.category = category; this.generationTime = generationTime; this.source = source; this.machine = machine; this.user = user; this.blob = blob; this.correlationActivityID = correlationActivityID; this.correlationRelatedActivityID = correlationRelatedActivityID; this.executionProcessID = executionProcessID; this.executionThreadID = executionThreadID; this.index = index; this.reserved = reserved; this.unformattedMessageList = unformattedMessageList; this.writeTime = writeTime; } /** * Gets the value of the eid property. * * @return * possible object is * {@link LongObjectPropertyType } * */ public LongObjectPropertyType getEID() { return eid; } /** * Sets the value of the eid property. * * @param value * allowed object is * {@link LongObjectPropertyType } * */ public void setEID(LongObjectPropertyType value) { this.eid = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setType(StringObjectPropertyType value) { this.type = value; } /** * Gets the value of the log property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getLog() { return log; } /** * Sets the value of the log property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setLog(StringObjectPropertyType value) { this.log = value; } /** * Gets the value of the message property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getMessage() { return message; } /** * Sets the value of the message property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setMessage(StringObjectPropertyType value) { this.message = value; } /** * Gets the value of the categoryNum property. * * @return * possible object is * {@link LongObjectPropertyType } * */ public LongObjectPropertyType getCategoryNum() { return categoryNum; } /** * Sets the value of the categoryNum property. * * @param value * allowed object is * {@link LongObjectPropertyType } * */ public void setCategoryNum(LongObjectPropertyType value) { this.categoryNum = value; } /** * Gets the value of the category property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getCategory() { return category; } /** * Sets the value of the category property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setCategory(StringObjectPropertyType value) { this.category = value; } /** * Gets the value of the generationTime property. * * @return * possible object is * {@link DateTimeObjectPropertyType } * */ public DateTimeObjectPropertyType getGenerationTime() { return generationTime; } /** * Sets the value of the generationTime property. * * @param value * allowed object is * {@link DateTimeObjectPropertyType } * */ public void setGenerationTime(DateTimeObjectPropertyType value) { this.generationTime = value; } /** * Gets the value of the source property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setSource(StringObjectPropertyType value) { this.source = value; } /** * Gets the value of the machine property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getMachine() { return machine; } /** * Sets the value of the machine property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setMachine(StringObjectPropertyType value) { this.machine = value; } /** * Gets the value of the user property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getUser() { return user; } /** * Sets the value of the user property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setUser(StringObjectPropertyType value) { this.user = value; } /** * Gets the value of the blob property. * * @return * possible object is * {@link Base64BinaryObjectPropertyType } * */ public Base64BinaryObjectPropertyType getBlob() { return blob; } /** * Sets the value of the blob property. * * @param value * allowed object is * {@link Base64BinaryObjectPropertyType } * */ public void setBlob(Base64BinaryObjectPropertyType value) { this.blob = value; } /** * Gets the value of the correlationActivityID property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getCorrelationActivityID() { return correlationActivityID; } /** * Sets the value of the correlationActivityID property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setCorrelationActivityID(StringObjectPropertyType value) { this.correlationActivityID = value; } /** * Gets the value of the correlationRelatedActivityID property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getCorrelationRelatedActivityID() { return correlationRelatedActivityID; } /** * Sets the value of the correlationRelatedActivityID property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setCorrelationRelatedActivityID(StringObjectPropertyType value) { this.correlationRelatedActivityID = value; } /** * Gets the value of the executionProcessID property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getExecutionProcessID() { return executionProcessID; } /** * Sets the value of the executionProcessID property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setExecutionProcessID(StringObjectPropertyType value) { this.executionProcessID = value; } /** * Gets the value of the executionThreadID property. * * @return * possible object is * {@link StringObjectPropertyType } * */ public StringObjectPropertyType getExecutionThreadID() { return executionThreadID; } /** * Sets the value of the executionThreadID property. * * @param value * allowed object is * {@link StringObjectPropertyType } * */ public void setExecutionThreadID(StringObjectPropertyType value) { this.executionThreadID = value; } /** * Gets the value of the index property. * * @return * possible object is * {@link LongObjectPropertyType } * */ public LongObjectPropertyType getIndex() { return index; } /** * Sets the value of the index property. * * @param value * allowed object is * {@link LongObjectPropertyType } * */ public void setIndex(LongObjectPropertyType value) { this.index = value; } /** * Gets the value of the reserved property. * * @return * possible object is * {@link LongObjectPropertyType } * */ public LongObjectPropertyType getReserved() { return reserved; } /** * Sets the value of the reserved property. * * @param value * allowed object is * {@link LongObjectPropertyType } * */ public void setReserved(LongObjectPropertyType value) { this.reserved = value; } /** * Gets the value of the unformattedMessageList property. * * @return * possible object is * {@link UnformattedMessageListType } * */ public UnformattedMessageListType getUnformattedMessageList() { return unformattedMessageList; } /** * Sets the value of the unformattedMessageList property. * * @param value * allowed object is * {@link UnformattedMessageListType } * */ public void setUnformattedMessageList(UnformattedMessageListType value) { this.unformattedMessageList = value; } /** * Gets the value of the writeTime property. * * @return * possible object is * {@link DateTimeObjectPropertyType } * */ public DateTimeObjectPropertyType getWriteTime() { return writeTime; } /** * Sets the value of the writeTime property. * * @param value * allowed object is * {@link DateTimeObjectPropertyType } * */ public void setWriteTime(DateTimeObjectPropertyType value) { this.writeTime = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof WindowsEventLog)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final WindowsEventLog that = ((WindowsEventLog) object); { LongObjectPropertyType lhsEID; lhsEID = this.getEID(); LongObjectPropertyType rhsEID; rhsEID = that.getEID(); if (!strategy.equals( LocatorUtils.property(thisLocator, "eid", lhsEID), LocatorUtils.property(thatLocator, "eid", rhsEID), lhsEID, rhsEID)) { return false; } } { StringObjectPropertyType lhsType; lhsType = this.getType(); StringObjectPropertyType rhsType; rhsType = that.getType(); if (!strategy.equals( LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) { return false; } } { StringObjectPropertyType lhsLog; lhsLog = this.getLog(); StringObjectPropertyType rhsLog; rhsLog = that.getLog(); if (!strategy.equals( LocatorUtils.property(thisLocator, "log", lhsLog), LocatorUtils.property(thatLocator, "log", rhsLog), lhsLog, rhsLog)) { return false; } } { StringObjectPropertyType lhsMessage; lhsMessage = this.getMessage(); StringObjectPropertyType rhsMessage; rhsMessage = that.getMessage(); if (!strategy.equals( LocatorUtils.property(thisLocator, "message", lhsMessage), LocatorUtils.property(thatLocator, "message", rhsMessage), lhsMessage, rhsMessage)) { return false; } } { LongObjectPropertyType lhsCategoryNum; lhsCategoryNum = this.getCategoryNum(); LongObjectPropertyType rhsCategoryNum; rhsCategoryNum = that.getCategoryNum(); if (!strategy.equals(LocatorUtils.property(thisLocator, "categoryNum", lhsCategoryNum), LocatorUtils.property( thatLocator, "categoryNum", rhsCategoryNum), lhsCategoryNum, rhsCategoryNum)) { return false; } } { StringObjectPropertyType lhsCategory; lhsCategory = this.getCategory(); StringObjectPropertyType rhsCategory; rhsCategory = that.getCategory(); if (!strategy .equals(LocatorUtils.property(thisLocator, "category", lhsCategory), LocatorUtils.property(thatLocator, "category", rhsCategory), lhsCategory, rhsCategory)) { return false; } } { DateTimeObjectPropertyType lhsGenerationTime; lhsGenerationTime = this.getGenerationTime(); DateTimeObjectPropertyType rhsGenerationTime; rhsGenerationTime = that.getGenerationTime(); if (!strategy.equals(LocatorUtils.property(thisLocator, "generationTime", lhsGenerationTime), LocatorUtils.property(thatLocator, "generationTime", rhsGenerationTime), lhsGenerationTime, rhsGenerationTime)) { return false; } } { StringObjectPropertyType lhsSource; lhsSource = this.getSource(); StringObjectPropertyType rhsSource; rhsSource = that.getSource(); if (!strategy.equals( LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource)) { return false; } } { StringObjectPropertyType lhsMachine; lhsMachine = this.getMachine(); StringObjectPropertyType rhsMachine; rhsMachine = that.getMachine(); if (!strategy.equals( LocatorUtils.property(thisLocator, "machine", lhsMachine), LocatorUtils.property(thatLocator, "machine", rhsMachine), lhsMachine, rhsMachine)) { return false; } } { StringObjectPropertyType lhsUser; lhsUser = this.getUser(); StringObjectPropertyType rhsUser; rhsUser = that.getUser(); if (!strategy.equals( LocatorUtils.property(thisLocator, "user", lhsUser), LocatorUtils.property(thatLocator, "user", rhsUser), lhsUser, rhsUser)) { return false; } } { Base64BinaryObjectPropertyType lhsBlob; lhsBlob = this.getBlob(); Base64BinaryObjectPropertyType rhsBlob; rhsBlob = that.getBlob(); if (!strategy.equals( LocatorUtils.property(thisLocator, "blob", lhsBlob), LocatorUtils.property(thatLocator, "blob", rhsBlob), lhsBlob, rhsBlob)) { return false; } } { StringObjectPropertyType lhsCorrelationActivityID; lhsCorrelationActivityID = this.getCorrelationActivityID(); StringObjectPropertyType rhsCorrelationActivityID; rhsCorrelationActivityID = that.getCorrelationActivityID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "correlationActivityID", lhsCorrelationActivityID), LocatorUtils.property(thatLocator, "correlationActivityID", rhsCorrelationActivityID), lhsCorrelationActivityID, rhsCorrelationActivityID)) { return false; } } { StringObjectPropertyType lhsCorrelationRelatedActivityID; lhsCorrelationRelatedActivityID = this .getCorrelationRelatedActivityID(); StringObjectPropertyType rhsCorrelationRelatedActivityID; rhsCorrelationRelatedActivityID = that .getCorrelationRelatedActivityID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "correlationRelatedActivityID", lhsCorrelationRelatedActivityID), LocatorUtils.property( thatLocator, "correlationRelatedActivityID", rhsCorrelationRelatedActivityID), lhsCorrelationRelatedActivityID, rhsCorrelationRelatedActivityID)) { return false; } } { StringObjectPropertyType lhsExecutionProcessID; lhsExecutionProcessID = this.getExecutionProcessID(); StringObjectPropertyType rhsExecutionProcessID; rhsExecutionProcessID = that.getExecutionProcessID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "executionProcessID", lhsExecutionProcessID), LocatorUtils .property(thatLocator, "executionProcessID", rhsExecutionProcessID), lhsExecutionProcessID, rhsExecutionProcessID)) { return false; } } { StringObjectPropertyType lhsExecutionThreadID; lhsExecutionThreadID = this.getExecutionThreadID(); StringObjectPropertyType rhsExecutionThreadID; rhsExecutionThreadID = that.getExecutionThreadID(); if (!strategy.equals(LocatorUtils.property(thisLocator, "executionThreadID", lhsExecutionThreadID), LocatorUtils .property(thatLocator, "executionThreadID", rhsExecutionThreadID), lhsExecutionThreadID, rhsExecutionThreadID)) { return false; } } { LongObjectPropertyType lhsIndex; lhsIndex = this.getIndex(); LongObjectPropertyType rhsIndex; rhsIndex = that.getIndex(); if (!strategy.equals( LocatorUtils.property(thisLocator, "index", lhsIndex), LocatorUtils.property(thatLocator, "index", rhsIndex), lhsIndex, rhsIndex)) { return false; } } { LongObjectPropertyType lhsReserved; lhsReserved = this.getReserved(); LongObjectPropertyType rhsReserved; rhsReserved = that.getReserved(); if (!strategy .equals(LocatorUtils.property(thisLocator, "reserved", lhsReserved), LocatorUtils.property(thatLocator, "reserved", rhsReserved), lhsReserved, rhsReserved)) { return false; } } { UnformattedMessageListType lhsUnformattedMessageList; lhsUnformattedMessageList = this.getUnformattedMessageList(); UnformattedMessageListType rhsUnformattedMessageList; rhsUnformattedMessageList = that.getUnformattedMessageList(); if (!strategy.equals(LocatorUtils.property(thisLocator, "unformattedMessageList", lhsUnformattedMessageList), LocatorUtils .property(thatLocator, "unformattedMessageList", rhsUnformattedMessageList), lhsUnformattedMessageList, rhsUnformattedMessageList)) { return false; } } { DateTimeObjectPropertyType lhsWriteTime; lhsWriteTime = this.getWriteTime(); DateTimeObjectPropertyType rhsWriteTime; rhsWriteTime = that.getWriteTime(); if (!strategy.equals(LocatorUtils.property(thisLocator, "writeTime", lhsWriteTime), LocatorUtils.property( thatLocator, "writeTime", rhsWriteTime), lhsWriteTime, rhsWriteTime)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { LongObjectPropertyType theEID; theEID = this.getEID(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "eid", theEID), currentHashCode, theEID); } { StringObjectPropertyType theType; theType = this.getType(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { StringObjectPropertyType theLog; theLog = this.getLog(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "log", theLog), currentHashCode, theLog); } { StringObjectPropertyType theMessage; theMessage = this.getMessage(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "message", theMessage), currentHashCode, theMessage); } { LongObjectPropertyType theCategoryNum; theCategoryNum = this.getCategoryNum(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "categoryNum", theCategoryNum), currentHashCode, theCategoryNum); } { StringObjectPropertyType theCategory; theCategory = this.getCategory(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "category", theCategory), currentHashCode, theCategory); } { DateTimeObjectPropertyType theGenerationTime; theGenerationTime = this.getGenerationTime(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "generationTime", theGenerationTime), currentHashCode, theGenerationTime); } { StringObjectPropertyType theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource); } { StringObjectPropertyType theMachine; theMachine = this.getMachine(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "machine", theMachine), currentHashCode, theMachine); } { StringObjectPropertyType theUser; theUser = this.getUser(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "user", theUser), currentHashCode, theUser); } { Base64BinaryObjectPropertyType theBlob; theBlob = this.getBlob(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "blob", theBlob), currentHashCode, theBlob); } { StringObjectPropertyType theCorrelationActivityID; theCorrelationActivityID = this.getCorrelationActivityID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "correlationActivityID", theCorrelationActivityID), currentHashCode, theCorrelationActivityID); } { StringObjectPropertyType theCorrelationRelatedActivityID; theCorrelationRelatedActivityID = this .getCorrelationRelatedActivityID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "correlationRelatedActivityID", theCorrelationRelatedActivityID), currentHashCode, theCorrelationRelatedActivityID); } { StringObjectPropertyType theExecutionProcessID; theExecutionProcessID = this.getExecutionProcessID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "executionProcessID", theExecutionProcessID), currentHashCode, theExecutionProcessID); } { StringObjectPropertyType theExecutionThreadID; theExecutionThreadID = this.getExecutionThreadID(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "executionThreadID", theExecutionThreadID), currentHashCode, theExecutionThreadID); } { LongObjectPropertyType theIndex; theIndex = this.getIndex(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "index", theIndex), currentHashCode, theIndex); } { LongObjectPropertyType theReserved; theReserved = this.getReserved(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "reserved", theReserved), currentHashCode, theReserved); } { UnformattedMessageListType theUnformattedMessageList; theUnformattedMessageList = this.getUnformattedMessageList(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "unformattedMessageList", theUnformattedMessageList), currentHashCode, theUnformattedMessageList); } { DateTimeObjectPropertyType theWriteTime; theWriteTime = this.getWriteTime(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "writeTime", theWriteTime), currentHashCode, theWriteTime); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public WindowsEventLog withEID(LongObjectPropertyType value) { setEID(value); return this; } public WindowsEventLog withType(StringObjectPropertyType value) { setType(value); return this; } public WindowsEventLog withLog(StringObjectPropertyType value) { setLog(value); return this; } public WindowsEventLog withMessage(StringObjectPropertyType value) { setMessage(value); return this; } public WindowsEventLog withCategoryNum(LongObjectPropertyType value) { setCategoryNum(value); return this; } public WindowsEventLog withCategory(StringObjectPropertyType value) { setCategory(value); return this; } public WindowsEventLog withGenerationTime(DateTimeObjectPropertyType value) { setGenerationTime(value); return this; } public WindowsEventLog withSource(StringObjectPropertyType value) { setSource(value); return this; } public WindowsEventLog withMachine(StringObjectPropertyType value) { setMachine(value); return this; } public WindowsEventLog withUser(StringObjectPropertyType value) { setUser(value); return this; } public WindowsEventLog withBlob(Base64BinaryObjectPropertyType value) { setBlob(value); return this; } public WindowsEventLog withCorrelationActivityID( StringObjectPropertyType value) { setCorrelationActivityID(value); return this; } public WindowsEventLog withCorrelationRelatedActivityID( StringObjectPropertyType value) { setCorrelationRelatedActivityID(value); return this; } public WindowsEventLog withExecutionProcessID(StringObjectPropertyType value) { setExecutionProcessID(value); return this; } public WindowsEventLog withExecutionThreadID(StringObjectPropertyType value) { setExecutionThreadID(value); return this; } public WindowsEventLog withIndex(LongObjectPropertyType value) { setIndex(value); return this; } public WindowsEventLog withReserved(LongObjectPropertyType value) { setReserved(value); return this; } public WindowsEventLog withUnformattedMessageList( UnformattedMessageListType value) { setUnformattedMessageList(value); return this; } public WindowsEventLog withWriteTime(DateTimeObjectPropertyType value) { setWriteTime(value); return this; } @Override public WindowsEventLog withCustomProperties(CustomPropertiesType value) { setCustomProperties(value); return this; } @Override public WindowsEventLog withObjectReference(QName value) { setObjectReference(value); return this; } public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { LongObjectPropertyType theEID; theEID = this.getEID(); strategy.appendField(locator, this, "eid", buffer, theEID); } { StringObjectPropertyType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { StringObjectPropertyType theLog; theLog = this.getLog(); strategy.appendField(locator, this, "log", buffer, theLog); } { StringObjectPropertyType theMessage; theMessage = this.getMessage(); strategy.appendField(locator, this, "message", buffer, theMessage); } { LongObjectPropertyType theCategoryNum; theCategoryNum = this.getCategoryNum(); strategy.appendField(locator, this, "categoryNum", buffer, theCategoryNum); } { StringObjectPropertyType theCategory; theCategory = this.getCategory(); strategy.appendField(locator, this, "category", buffer, theCategory); } { DateTimeObjectPropertyType theGenerationTime; theGenerationTime = this.getGenerationTime(); strategy.appendField(locator, this, "generationTime", buffer, theGenerationTime); } { StringObjectPropertyType theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource); } { StringObjectPropertyType theMachine; theMachine = this.getMachine(); strategy.appendField(locator, this, "machine", buffer, theMachine); } { StringObjectPropertyType theUser; theUser = this.getUser(); strategy.appendField(locator, this, "user", buffer, theUser); } { Base64BinaryObjectPropertyType theBlob; theBlob = this.getBlob(); strategy.appendField(locator, this, "blob", buffer, theBlob); } { StringObjectPropertyType theCorrelationActivityID; theCorrelationActivityID = this.getCorrelationActivityID(); strategy.appendField(locator, this, "correlationActivityID", buffer, theCorrelationActivityID); } { StringObjectPropertyType theCorrelationRelatedActivityID; theCorrelationRelatedActivityID = this .getCorrelationRelatedActivityID(); strategy.appendField(locator, this, "correlationRelatedActivityID", buffer, theCorrelationRelatedActivityID); } { StringObjectPropertyType theExecutionProcessID; theExecutionProcessID = this.getExecutionProcessID(); strategy.appendField(locator, this, "executionProcessID", buffer, theExecutionProcessID); } { StringObjectPropertyType theExecutionThreadID; theExecutionThreadID = this.getExecutionThreadID(); strategy.appendField(locator, this, "executionThreadID", buffer, theExecutionThreadID); } { LongObjectPropertyType theIndex; theIndex = this.getIndex(); strategy.appendField(locator, this, "index", buffer, theIndex); } { LongObjectPropertyType theReserved; theReserved = this.getReserved(); strategy.appendField(locator, this, "reserved", buffer, theReserved); } { UnformattedMessageListType theUnformattedMessageList; theUnformattedMessageList = this.getUnformattedMessageList(); strategy.appendField(locator, this, "unformattedMessageList", buffer, theUnformattedMessageList); } { DateTimeObjectPropertyType theWriteTime; theWriteTime = this.getWriteTime(); strategy.appendField(locator, this, "writeTime", buffer, theWriteTime); } 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, WindowsEventLog.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 WindowsEventLog instance for XML String * * @param text * XML String for the document * @return The WindowsEventLog instance for the passed XML String */ public static WindowsEventLog fromXMLString(String text) { JAXBContext jaxbContext; try { jaxbContext = JAXBContext.newInstance(WindowsEventLog.class .getPackage().getName()); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setSchema(STIXSchema.getInstance().getSchema()); unmarshaller.setEventHandler(new ValidationEventHandler()); StreamSource streamSource = new StreamSource(new StringReader(text)); return (WindowsEventLog) unmarshaller.unmarshal(streamSource); } catch (JAXBException e) { throw new RuntimeException(e); } } /** * Validates the XML representation of this WindowsEventLog instance * Returning true indicating a successful validation, false if not. * * @return boolean */ public boolean validate() { return STIXSchema.getInstance().validate(toXMLString()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy