org.processmining.framework.log
Class LogEvent

java.lang.Object
  extended by org.processmining.framework.log.LogEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
DiagnosticLogEvent

public class LogEvent
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable, java.lang.Cloneable

A log event (ie unique combination of a name (ie TASK_A) and a type (ie complete)).

Author:
Peter van den Brand
See Also:
Serialized Form

Field Summary
protected  java.lang.String modelElementName
           
protected  java.lang.String modelElementType
           
protected  int occurenceCount
           
 
Constructor Summary
LogEvent(java.lang.String name, java.lang.String type)
           
LogEvent(java.lang.String name, java.lang.String type, int numSimilarTraces)
           
 
Method Summary
 java.lang.Object clone()
          Make a deep copy of the object.
 int compareTo(java.lang.Object o)
          Overridden to specify when a log event is considered smaller or greate than another.
 void copy(LogEvent e)
           
 boolean equals(java.lang.Object o)
          Overrides the equals method in order to specify when two log events are considered as equal.
 boolean equals(java.lang.String name, java.lang.String type)
           
 java.lang.String getEventType()
           
 java.lang.String getModelElementName()
           
 int getOccurrenceCount()
          Returns the number of times this event occurs in the workflow log.
 int hashCode()
          Overridden to produce the same hash code for equal objects.
 void incOccurrenceCount()
           
 void incOccurrenceCount(int numSimilarInstances)
           
 java.lang.String toString()
          Overridden to produce a string representation of this log event.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

modelElementName

protected java.lang.String modelElementName

modelElementType

protected java.lang.String modelElementType

occurenceCount

protected int occurenceCount
Constructor Detail

LogEvent

public LogEvent(java.lang.String name,
                java.lang.String type)

LogEvent

public LogEvent(java.lang.String name,
                java.lang.String type,
                int numSimilarTraces)
Method Detail

getModelElementName

public java.lang.String getModelElementName()

getEventType

public java.lang.String getEventType()

copy

public void copy(LogEvent e)

getOccurrenceCount

public int getOccurrenceCount()
Returns the number of times this event occurs in the workflow log.

Returns:
the number of times this event occurs in the workflow log

incOccurrenceCount

public void incOccurrenceCount()

incOccurrenceCount

public void incOccurrenceCount(int numSimilarInstances)

equals

public boolean equals(java.lang.String name,
                      java.lang.String type)

equals

public boolean equals(java.lang.Object o)
Overrides the equals method in order to specify when two log events are considered as equal.

Overrides:
equals in class java.lang.Object
Returns:
true if the name and the type are equal, false otherwise

hashCode

public int hashCode()
Overridden to produce the same hash code for equal objects.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code calculated

toString

public java.lang.String toString()
Overridden to produce a string representation of this log event.

Overrides:
toString in class java.lang.Object
Returns:
a string composed out of the name of the log event and its type in the following form: "name (type)"

compareTo

public int compareTo(java.lang.Object o)
Overridden to specify when a log event is considered smaller or greate than another.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the object to be compared with
Returns:
the value yielded when comparing the string representation of this log event with the one of the given object
See Also:
toString()

clone

public java.lang.Object clone()
Make a deep copy of the object. Note that this method needs to be extended as soon as there are attributes added to the class which are not primitive or immutable.

Overrides:
clone in class java.lang.Object
Returns:
the cloned object