org.lwes
Class Event

java.lang.Object
  extended by org.lwes.Event

public class Event
extends java.lang.Object


Field Summary
static short DEFAULT_ENCODING
           
static java.lang.String ENCODING
          Reserved metadata keywords
static CharacterEncoding[] ENCODING_STRINGS
           
static short ISO_8859_1
          Encoding variables
static java.lang.String RECEIPT_TIME
           
static java.lang.String SENDER_IP
           
static java.lang.String SENDER_PORT
           
static short UTF_8
           
 
Constructor Summary
Event(byte[] bytes, boolean validate, EventTemplateDB eventTemplateDB)
          Creates an event by deserializing a raw byte array.
Event(byte[] bytes, EventTemplateDB eventTemplateDB)
          Creates an event by deserializing a raw byte array.
Event(java.lang.String eventName, boolean validate, EventTemplateDB eventTemplateDB)
          Create an event called eventName
Event(java.lang.String eventName, boolean validate, EventTemplateDB eventTemplateDB, short encoding)
          Create an event called eventName
Event(java.lang.String eventName, EventTemplateDB eventTemplateDB)
          Create an event called eventName
 
Method Summary
 Event copy()
          Returns a mutable copy of the event.
 void deserialize(byte[] bytes)
          Deserialize the Event from byte array
 boolean equals(java.lang.Object o)
           
 java.lang.Object get(java.lang.String attributeName)
          Generic accessor, checks if an attribute exists and returns its value.
 boolean getBoolean(java.lang.String attributeName)
          Accessor that returns a boolean value for attribute attributeName
 short getEncoding()
          Get the character encoding for this event
 java.util.Enumeration<java.lang.String> getEventAttributeNames()
          Returns an enumeration of all the event attribute names
 java.lang.String getEventName()
          Returns the name of the event
 EventTemplateDB getEventTemplateDB()
          Returns the EventTemplateDB for this event, used for validation of types and attributes.
 java.net.InetAddress getInetAddress(java.lang.String attributeName)
          Accessor that returns an InetAddress, for attribute attributeName
 short getInt16(java.lang.String attributeName)
          Accessor that returns an short, for attribute attributeName
 int getInt32(java.lang.String attributeName)
          Accessor that returns an int, for attribute attributeName
 long getInt64(java.lang.String attributeName)
          Accessor that returns an long, for attribute attributeName
 byte[] getIPAddress(java.lang.String attributeName)
          Accessor that returns an IP address in bytes, for attribute attributeName
 java.lang.String getString(java.lang.String attributeName)
          Accessor that returns an String, for attribute attributeName
 int getUInt16(java.lang.String attributeName)
          Accessor that returns an unsigned short, in the guise of an int, for attribute attributeName
 long getUInt32(java.lang.String attributeName)
          Accessor that returns an unsigned int, in the guise of an long, for attribute attributeName
 java.math.BigInteger getUInt64(java.lang.String attributeName)
          Accessor that returns an unsigned long, in the guise of an BigInteger, for attribute attributeName
 boolean isValidating()
          Returns true if the event validates against the EventTemplateDB before making changes
 byte[] serialize()
          Serializes the Event into a byte array
 void set(java.lang.String attributeName, java.lang.Object attributeValue)
          Set the object's attribute attributeName with the Object given
 void setBoolean(java.lang.String attributeName, boolean aBool)
          Sets the given attribute with a boolean value given by aBool.
 void setBoolean(java.lang.String attributeName, java.lang.Boolean aBool)
          Sets the given attribute with a Boolean value given by aBool.
 void setEncoding(short encoding)
          Set the character encoding for event strings
 void setEventName(java.lang.String name)
          Sets the name of the Event
 void setEventTemplateDB(EventTemplateDB eventTemplateDB)
          Sets the EventTemplateDB for this event, used for validation of types and attributes.
 void setInt16(java.lang.String attributeName, short aNumber)
          Set the given attribute with the short value given by aNumber.
 void setInt16(java.lang.String attributeName, java.lang.Short aNumber)
          Set the given attribute with the Short value given by aNumber.
 void setInt32(java.lang.String attributeName, int aNumber)
          Set the given attribute with the int value given by aNumber.
 void setInt32(java.lang.String attributeName, java.lang.Integer aNumber)
          Set the given attribute with the Integer value given by aNumber.
 void setInt64(java.lang.String attributeName, long aNumber)
          Set the given attribute with the long value given by aNumber.
 void setInt64(java.lang.String attributeName, java.lang.Long aNumber)
          Set the given attribute with the Long value given by aNumber.
 void setIPAddress(java.lang.String attributeName, byte[] address)
          Set the given attribute with the ip address value given by address
 void setIPAddress(java.lang.String attributeName, java.net.InetAddress address)
          Set the given attribute with the ip address value given by address
 void setIPAddress(java.lang.String attributeName, IPAddress address)
          Set the given attribute with the ip address value given by address
 void setString(java.lang.String attributeName, java.lang.String aString)
          Set the given attribute with a String
 void setUInt16(java.lang.String attributeName, int aNumber)
          Set the given attribute with the unsigned short value given by aNumber.
 void setUInt16(java.lang.String attributeName, java.lang.Integer aNumber)
          Set the given attribute with the Integer value given by aNumber.
 void setUInt32(java.lang.String attributeName, long aNumber)
          Set the given attribute with the unsigned int value given by aNumber.
 void setUInt32(java.lang.String attributeName, java.lang.Long aNumber)
          Set the given attribute with the Long value given by aNumber.
 void setUInt64(java.lang.String attributeName, java.math.BigInteger aNumber)
          Set the given attribute with the BigInteger value given by aNumber.
 void setUInt64(java.lang.String attributeName, long aNumber)
          Set the given attribute with the unsigned long value given by aNumber.
 void setUInt64(java.lang.String attributeName, java.lang.Long aNumber)
          Set the given attribute with the Long value given by aNumber.
 void setValidating(boolean validate)
          Set to true if the event should validate against the EventTemplateDB before making changes
 int size()
          Returns the number of attributes in the event
 java.lang.String toString()
          Returns a String representation of this event
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENCODING

public static final java.lang.String ENCODING
Reserved metadata keywords

See Also:
Constant Field Values

RECEIPT_TIME

public static final java.lang.String RECEIPT_TIME
See Also:
Constant Field Values

SENDER_IP

public static final java.lang.String SENDER_IP
See Also:
Constant Field Values

SENDER_PORT

public static final java.lang.String SENDER_PORT
See Also:
Constant Field Values

ISO_8859_1

public static final short ISO_8859_1
Encoding variables

See Also:
Constant Field Values

UTF_8

public static final short UTF_8
See Also:
Constant Field Values

DEFAULT_ENCODING

public static final short DEFAULT_ENCODING
See Also:
Constant Field Values

ENCODING_STRINGS

public static final CharacterEncoding[] ENCODING_STRINGS
Constructor Detail

Event

public Event(java.lang.String eventName,
             EventTemplateDB eventTemplateDB)
      throws NoSuchEventException,
             NoSuchAttributeException,
             NoSuchAttributeTypeException
Create an event called eventName

Parameters:
eventName - the name of the event
eventTemplateDB - the EventTemplateDB to use for validation
Throws:
NoSuchEventException - if the Event does not exist in the EventTemplateDB
NoSuchAttributeException - if an attribute does not exist in the EventTemplateDB
NoSuchAttributeTypeException - if an attribute type does not exist in the EventTemplateDB

Event

public Event(java.lang.String eventName,
             boolean validate,
             EventTemplateDB eventTemplateDB)
      throws NoSuchEventException,
             NoSuchAttributeException,
             NoSuchAttributeTypeException
Create an event called eventName

Parameters:
eventName - the name of the event
validate - true if the EventTemplateDB should be checked for types before all mutations
eventTemplateDB - the EventTemplateDB to use for validation
Throws:
NoSuchEventException - if the Event does not exist in the EventTemplateDB
NoSuchAttributeException - if an attribute does not exist in the EventTemplateDB
NoSuchAttributeTypeException - if an attribute type does not exist in the EventTemplateDB

Event

public Event(java.lang.String eventName,
             boolean validate,
             EventTemplateDB eventTemplateDB,
             short encoding)
      throws NoSuchEventException,
             NoSuchAttributeException,
             NoSuchAttributeTypeException
Create an event called eventName

Parameters:
eventName - the name of the event
validate - true if the EventTemplateDB should be checked for types before all mutations
encoding - the character encoding used by the event
Throws:
NoSuchEventException - if the Event does not exist in the EventTemplateDB
NoSuchAttributeException - if an attribute does not exist in the EventTemplateDB
NoSuchAttributeTypeException - if an attribute type does not exist in the EventTemplateDB

Event

public Event(byte[] bytes,
             EventTemplateDB eventTemplateDB)
      throws NoSuchEventException,
             NoSuchAttributeException,
             NoSuchAttributeTypeException
Creates an event by deserializing a raw byte array.

Parameters:
bytes - the raw bytes to convert
eventTemplateDB - the EventTemplateDB to use to validate the event
Throws:
NoSuchEventException
NoSuchAttributeException
NoSuchAttributeTypeException

Event

public Event(byte[] bytes,
             boolean validate,
             EventTemplateDB eventTemplateDB)
      throws NoSuchEventException,
             NoSuchAttributeException,
             NoSuchAttributeTypeException
Creates an event by deserializing a raw byte array.

Parameters:
bytes - the raw bytes to convert
validate - whether or not to validate the event
eventTemplateDB - the EventTemplateDB to use to validate the event
Throws:
NoSuchEventException
NoSuchAttributeException
NoSuchAttributeTypeException
Method Detail

getEventAttributeNames

public java.util.Enumeration<java.lang.String> getEventAttributeNames()
Returns an enumeration of all the event attribute names

Returns:
an enumeration of attribute strings

size

public int size()
Returns the number of attributes in the event

Returns:
number of attributes in the event

isValidating

public boolean isValidating()
Returns true if the event validates against the EventTemplateDB before making changes

Returns:
the validating state

setValidating

public void setValidating(boolean validate)
Set to true if the event should validate against the EventTemplateDB before making changes

Parameters:
validate - the validating value

getEventTemplateDB

public EventTemplateDB getEventTemplateDB()
Returns the EventTemplateDB for this event, used for validation of types and attributes.

Returns:
the EventTemplateDB

setEventTemplateDB

public void setEventTemplateDB(EventTemplateDB eventTemplateDB)
Sets the EventTemplateDB for this event, used for validation of types and attributes.

Parameters:
eventTemplateDB - the EventTemplateDB to be used for validation

getEventName

public java.lang.String getEventName()
Returns the name of the event

Returns:
the name of the event

setEventName

public void setEventName(java.lang.String name)
                  throws NoSuchEventException
Sets the name of the Event

Parameters:
name - the name of the event
Throws:
NoSuchEventException - if the event is validating and does not exist in the EventTemplateDB

getEncoding

public short getEncoding()
Get the character encoding for this event

Returns:
the encoding

setEncoding

public void setEncoding(short encoding)
                 throws NoSuchAttributeException,
                        NoSuchAttributeTypeException
Set the character encoding for event strings

Parameters:
encoding - the character encoding
Throws:
NoSuchAttributeTypeException - if the type for the encoding attribute does not exist
NoSuchAttributeException - if the encoding attribute does not exist

get

public java.lang.Object get(java.lang.String attributeName)
                     throws NoSuchAttributeException
Generic accessor, checks if an attribute exists and returns its value. The user must do their own type checking.

Parameters:
attributeName - name of the attribute to lookup
Returns:
the object poitned to by attributeName
Throws:
NoSuchAttributeException - if the attribute does not exist in this event

getBoolean

public boolean getBoolean(java.lang.String attributeName)
                   throws AttributeNotSetException,
                          NoSuchAttributeException
Accessor that returns a boolean value for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the boolean value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getUInt16

public int getUInt16(java.lang.String attributeName)
              throws AttributeNotSetException,
                     NoSuchAttributeException
Accessor that returns an unsigned short, in the guise of an int, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the unsigned short as an int
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getInt16

public short getInt16(java.lang.String attributeName)
               throws AttributeNotSetException,
                      NoSuchAttributeException
Accessor that returns an short, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the short value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getUInt32

public long getUInt32(java.lang.String attributeName)
               throws AttributeNotSetException,
                      NoSuchAttributeException
Accessor that returns an unsigned int, in the guise of an long, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the unsigned int as a long
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getInt32

public int getInt32(java.lang.String attributeName)
             throws AttributeNotSetException,
                    NoSuchAttributeException
Accessor that returns an int, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the int value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getUInt64

public java.math.BigInteger getUInt64(java.lang.String attributeName)
                               throws AttributeNotSetException,
                                      NoSuchAttributeException
Accessor that returns an unsigned long, in the guise of an BigInteger, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the unsigned long as a BigInteger
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getInt64

public long getInt64(java.lang.String attributeName)
              throws AttributeNotSetException,
                     NoSuchAttributeException
Accessor that returns an long, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the long value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getString

public java.lang.String getString(java.lang.String attributeName)
                           throws AttributeNotSetException,
                                  NoSuchAttributeException
Accessor that returns an String, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the String value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getInetAddress

public java.net.InetAddress getInetAddress(java.lang.String attributeName)
                                    throws AttributeNotSetException,
                                           NoSuchAttributeException
Accessor that returns an InetAddress, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the InetAddress value
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

getIPAddress

public byte[] getIPAddress(java.lang.String attributeName)
                    throws AttributeNotSetException,
                           NoSuchAttributeException
Accessor that returns an IP address in bytes, for attribute attributeName

Parameters:
attributeName - the name of the attribute to fetch
Returns:
the IP address in bytes
Throws:
AttributeNotSetException - if the attribute has not been set in this event
NoSuchAttributeException - if the attribute does not exist in this event

set

public void set(java.lang.String attributeName,
                java.lang.Object attributeValue)
         throws NoSuchAttributeException,
                NoSuchAttributeTypeException
Set the object's attribute attributeName with the Object given

Parameters:
attributeName - the name of the attribute to set
attributeValue - the object to set the attribute with
Throws:
NoSuchAttributeException - if the attribute does not exist in this event
NoSuchAttributeTypeException - if there is an attribute with an undefined type

setBoolean

public void setBoolean(java.lang.String attributeName,
                       boolean aBool)
                throws NoSuchAttributeException,
                       NoSuchAttributeTypeException
Sets the given attribute with a boolean value given by aBool.

Parameters:
attributeName - the attribute to set
aBool - the boolean value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setBoolean

public void setBoolean(java.lang.String attributeName,
                       java.lang.Boolean aBool)
                throws NoSuchAttributeException,
                       NoSuchAttributeTypeException
Sets the given attribute with a Boolean value given by aBool.

Parameters:
attributeName - the attribute to set
aBool - the boolean value to set
Throws:
NoSuchAttributeException
NoSuchAttributeTypeException

setUInt16

public void setUInt16(java.lang.String attributeName,
                      int aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the unsigned short value given by aNumber. Because Java does not support unsigned types, we must use a signed int to cover the range of unsigned short.

Parameters:
attributeName - the attribute to set
aNumber - the unsigned short value as an integer
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt16

public void setUInt16(java.lang.String attributeName,
                      java.lang.Integer aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the Integer value given by aNumber. This should be an unsigned short, but is an Integer because Java does not support unsigned types, and a signed integer is needed to cover the range of an unsigned short.

Parameters:
attributeName - the attribute to set
aNumber - the value
Throws:
NoSuchAttributeException
NoSuchAttributeTypeException

setInt16

public void setInt16(java.lang.String attributeName,
                     short aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the short value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the short value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setInt16

public void setInt16(java.lang.String attributeName,
                     java.lang.Short aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the Short value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the short value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt32

public void setUInt32(java.lang.String attributeName,
                      long aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the unsigned int value given by aNumber. Because Java does not support unsigned types, we must use a signed long to cover the range of an unsigned int.

Parameters:
attributeName - the attribute to set
aNumber - the unsigned int value as a long
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt32

public void setUInt32(java.lang.String attributeName,
                      java.lang.Long aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the Long value given by aNumber. This should be an unsigned int, but is an Long because Java does not support unsigned types, and a signed long is needed to cover the range of an unsigned int.

Parameters:
attributeName - the attribute to set
aNumber - the value
Throws:
NoSuchAttributeException
NoSuchAttributeTypeException

setInt32

public void setInt32(java.lang.String attributeName,
                     int aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the int value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the integer value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setInt32

public void setInt32(java.lang.String attributeName,
                     java.lang.Integer aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the Integer value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the Integer value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt64

public void setUInt64(java.lang.String attributeName,
                      long aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the unsigned long value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the value
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt64

public void setUInt64(java.lang.String attributeName,
                      java.lang.Long aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the Long value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the value
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setUInt64

public void setUInt64(java.lang.String attributeName,
                      java.math.BigInteger aNumber)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with the BigInteger value given by aNumber. This should be an unsigned long, but is an BigInteger because Java does not support unsigned types, and a BigInteger is needed to cover the range of an unsigned long.

Parameters:
attributeName - the attribute to set
aNumber - the value
Throws:
NoSuchAttributeException
NoSuchAttributeTypeException

setInt64

public void setInt64(java.lang.String attributeName,
                     long aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the long value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the long value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setInt64

public void setInt64(java.lang.String attributeName,
                     java.lang.Long aNumber)
              throws NoSuchAttributeException,
                     NoSuchAttributeTypeException
Set the given attribute with the Long value given by aNumber.

Parameters:
attributeName - the attribute to set
aNumber - the Long value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setString

public void setString(java.lang.String attributeName,
                      java.lang.String aString)
               throws NoSuchAttributeException,
                      NoSuchAttributeTypeException
Set the given attribute with a String

Parameters:
attributeName - the attribute to set
aString - the String value to set
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setIPAddress

public void setIPAddress(java.lang.String attributeName,
                         byte[] address)
                  throws NoSuchAttributeException,
                         NoSuchAttributeTypeException
Set the given attribute with the ip address value given by address

Parameters:
attributeName - the attribute to set
address - the ip address in bytes
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setIPAddress

public void setIPAddress(java.lang.String attributeName,
                         java.net.InetAddress address)
                  throws NoSuchAttributeException,
                         NoSuchAttributeTypeException
Set the given attribute with the ip address value given by address

Parameters:
attributeName - the attribute to set
address - the ip address in bytes
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

setIPAddress

public void setIPAddress(java.lang.String attributeName,
                         IPAddress address)
                  throws NoSuchAttributeException,
                         NoSuchAttributeTypeException
Set the given attribute with the ip address value given by address

Parameters:
attributeName - the attribute to set
address - the ip address in bytes
Throws:
NoSuchAttributeException - if the attribute does not exist in the event
NoSuchAttributeTypeException - if the attribute type does not match the EventTemplateDB

serialize

public byte[] serialize()
Serializes the Event into a byte array

Returns:
the serialized byte array

deserialize

public void deserialize(byte[] bytes)
                 throws NoSuchEventException,
                        NoSuchAttributeException,
                        NoSuchAttributeTypeException
Deserialize the Event from byte array

Parameters:
bytes - the byte array containing a serialized Event
Throws:
NoSuchEventException
NoSuchAttributeException
NoSuchAttributeTypeException

copy

public Event copy()
           throws NoSuchEventException,
                  NoSuchAttributeException,
                  NoSuchAttributeTypeException
Returns a mutable copy of the event. This is a SLOW operation.

Returns:
Event the Event object
Throws:
NoSuchEventException - if the Event does not exist in the EventTemplateDB
NoSuchAttributeException - if the attribute does not exist in this event
NoSuchAttributeTypeException - if there is an attribute that does not match a type in the EventTemplateDB

toString

public java.lang.String toString()
Returns a String representation of this event

Overrides:
toString in class java.lang.Object
Returns:
a String return of this event.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object