org.processmining.mining.dmcscanning.logutils
Class AbstractEvent

java.lang.Object
  extended by org.processmining.mining.dmcscanning.logutils.AbstractEvent
All Implemented Interfaces:
java.lang.Comparable, LogItem

public class AbstractEvent
extends java.lang.Object
implements LogItem

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected  AuditTrailEntry endEvent
           
protected  LogItemOrder position
           
protected  ProcessInstance processInstance
           
protected  AuditTrailEntry startEvent
           
 
Constructor Summary
protected AbstractEvent(ProcessInstance aProcessInstance, AuditTrailEntry aStartEvent, AuditTrailEntry anEndEvent)
          constructor protected - use factory methods for instantiation;
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
static AbstractEvent create(ProcessInstance aProcessInstance, AuditTrailEntry aStartEvent)
          creates a new atomic abstract event
static AbstractEvent create(ProcessInstance aProcessInstance, AuditTrailEntry aStartEvent, AuditTrailEntry anEndEvent)
          Creates a new durating abstract event
 int getComparisonIndex()
           
 java.lang.String getElement()
          Convenience method for AuditTrailEntry compatibility; mapped to start event.
 AuditTrailEntry getEndEvent()
           
 java.util.Date getLeftBoundaryTimestamp()
          Start and end position are expected to represent sub-item boundaries of compound log items.
 LogItemOrder getOrder()
           
 java.lang.String getOriginator()
          Convenience method for AuditTrailEntry compatibility; mapped to start event.
 long getPosition()
          The return value represents the logical position of this log item within the sequence of events (starting from zero and ascending).
 ProcessInstance getProcessInstance()
           
 java.util.Date getRightBoundaryTimestamp()
          Start and end position are expected to represent sub-item boundaries of compound log items.
 AuditTrailEntry getStartEvent()
           
 java.util.Date getTimestamp()
          Convenience method for AuditTrailEntry compatibility; mapped to start event.
 java.lang.String getType()
          Convenience method for AuditTrailEntry compatibility; mapped to start event.
 boolean isAtomic()
          Determines, whether this log event is atomic or durable; Atomic, in this context, is interpreted as tStart == tEnd, in contrast to durable, where tStart < tEnd.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processInstance

protected ProcessInstance processInstance

startEvent

protected AuditTrailEntry startEvent

endEvent

protected AuditTrailEntry endEvent

position

protected LogItemOrder position
Constructor Detail

AbstractEvent

protected AbstractEvent(ProcessInstance aProcessInstance,
                        AuditTrailEntry aStartEvent,
                        AuditTrailEntry anEndEvent)
constructor protected - use factory methods for instantiation;

Parameters:
aProcessInstance - the process instance where this abstract event is contained
aStartEvent - left boundary atomic event
anEndEvent - right boundary atomic event
aPosition - logical log position (first=0, ascending)
Method Detail

create

public static AbstractEvent create(ProcessInstance aProcessInstance,
                                   AuditTrailEntry aStartEvent,
                                   AuditTrailEntry anEndEvent)
Creates a new durating abstract event

Parameters:
aProcessInstance -
aStartEvent -
anEndEvent -
Returns:

create

public static AbstractEvent create(ProcessInstance aProcessInstance,
                                   AuditTrailEntry aStartEvent)
creates a new atomic abstract event

Parameters:
aProcessInstance -
aStartEvent -
Returns:

getProcessInstance

public ProcessInstance getProcessInstance()
Returns:
the process instance this event stems from

getStartEvent

public AuditTrailEntry getStartEvent()
Returns:
the start event of a composite event; single event if atomic

getEndEvent

public AuditTrailEntry getEndEvent()
Returns:
the end event of a composite event; single event if atomic

getElement

public java.lang.String getElement()
Convenience method for AuditTrailEntry compatibility; mapped to start event.

Returns:

getOriginator

public java.lang.String getOriginator()
Convenience method for AuditTrailEntry compatibility; mapped to start event.

Returns:

getType

public java.lang.String getType()
Convenience method for AuditTrailEntry compatibility; mapped to start event.

Returns:

getTimestamp

public java.util.Date getTimestamp()
Convenience method for AuditTrailEntry compatibility; mapped to start event.

Returns:

getLeftBoundaryTimestamp

public java.util.Date getLeftBoundaryTimestamp()
Description copied from interface: LogItem
Start and end position are expected to represent sub-item boundaries of compound log items. In case the implementing class represents an atomic log item, the respective start- and end-getters are expected to return an identical value.

Specified by:
getLeftBoundaryTimestamp in interface LogItem
Returns:
the timestamp representing the left boundary of this log item

getRightBoundaryTimestamp

public java.util.Date getRightBoundaryTimestamp()
Description copied from interface: LogItem
Start and end position are expected to represent sub-item boundaries of compound log items. In case the implementing class represents an atomic log item, the respective start- and end-getters are expected to return an identical value.

Specified by:
getRightBoundaryTimestamp in interface LogItem
Returns:
the timestamp representing the right boundary of this log item

getPosition

public long getPosition()
Description copied from interface: LogItem
The return value represents the logical position of this log item within the sequence of events (starting from zero and ascending). If not implemented, return a negative value here.

Specified by:
getPosition in interface LogItem
Returns:

getOrder

public LogItemOrder getOrder()

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable

isAtomic

public boolean isAtomic()
Description copied from interface: LogItem
Determines, whether this log event is atomic or durable; Atomic, in this context, is interpreted as tStart == tEnd, in contrast to durable, where tStart < tEnd.

Specified by:
isAtomic in interface LogItem
Returns:

getComparisonIndex

public int getComparisonIndex()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object