org.processmining.mining.dmcscanning
Class Dmc

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

public class Dmc
extends java.lang.Object
implements LogItem

This class represents a Data Modification Cluster (DMC). Data modification clusters extracted in the initial scan pass.

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

Field Summary
protected  java.util.Date endDate
           
protected  java.util.ArrayList<AbstractEvent> events
           
protected  Footprint footprint
           
protected static long id_counter
          static counter value for providing unique id numbers
protected  long id_nr
           
protected  java.lang.String id_string
           
protected  ProcessInstance processInstance
           
protected  java.util.Date startDate
           
 
Constructor Summary
Dmc()
          creates a new DMC object
Dmc(Dmc copy)
          copy constructor
Dmc(java.lang.String id)
          constructor
 
Method Summary
 void addEvent(AbstractEvent entry)
          Adds a new event to this DMC
 int compareTo(java.lang.Object arg0)
           
 boolean conflicts(Dmc other)
          checks whether this DMC is in conflict with another one, i.e.
 boolean containsEvent(AbstractEvent entry)
          deep check whether a given AbstractEvent is contained within this DMC's event set
 boolean equals(java.lang.Object obj)
          tests with equality to another DMC WARNING: As 'AuditTrailEntry' does so far not override the 'equals()' method this method does, as well, not check for real value equality.
 Footprint footprint()
          Retrieves the minimal list of modified data objects in this DMC
 java.util.ArrayList<AbstractEvent> getEvents()
           
 long getIdNumber()
           
 java.lang.String getIdString()
           
 java.util.Date getLeftBoundaryTimestamp()
          Start and end position are expected to represent sub-item boundaries of compound log items.
 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.
 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.
 boolean isConsistent(ObjectEquivalence equiv)
          checks the inner consistency of a DMC, i.e.
 boolean isSimilarTo(Dmc other)
          Tests for similarity with another DMC.
 java.util.Iterator<AbstractEvent> iterator()
           
 void makeFootprintCanonical(ObjectEquivalence equiv)
          Converts all data object identifiers in the footprint to canonical representations of the data objects, following the rules implemented in the given equivalence relation implementation.
protected static long nextId()
          Static facility to provide unique, ascending id numbers
static void resetIdCounter()
          manually resets the static id counter to zero
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id_counter

protected static long id_counter
static counter value for providing unique id numbers


events

protected java.util.ArrayList<AbstractEvent> events

startDate

protected java.util.Date startDate

endDate

protected java.util.Date endDate

footprint

protected Footprint footprint

id_nr

protected long id_nr

id_string

protected java.lang.String id_string

processInstance

protected ProcessInstance processInstance
Constructor Detail

Dmc

public Dmc()
creates a new DMC object


Dmc

public Dmc(java.lang.String id)
constructor

Parameters:
id - a custom id string

Dmc

public Dmc(Dmc copy)
copy constructor

Parameters:
copy - the original DMC to copy
Method Detail

nextId

protected static long nextId()
Static facility to provide unique, ascending id numbers

Returns:
a unique id number

resetIdCounter

public static void resetIdCounter()
manually resets the static id counter to zero


addEvent

public void addEvent(AbstractEvent entry)
Adds a new event to this DMC

Parameters:
entry -

getEvents

public java.util.ArrayList<AbstractEvent> getEvents()
Returns:
the set of events contained within this DMC

iterator

public java.util.Iterator<AbstractEvent> iterator()
Returns:
iterator over DMCs contained

size

public int size()
Returns:
number of events contained

footprint

public Footprint footprint()
Retrieves the minimal list of modified data objects in this DMC

Returns:

conflicts

public boolean conflicts(Dmc other)
checks whether this DMC is in conflict with another one, i.e. they share at least one event.

Parameters:
other - DMC to test conflict with
Returns:

isSimilarTo

public boolean isSimilarTo(Dmc other)
Tests for similarity with another DMC. Two DMCs are considered similar if their footprints match.

Parameters:
other -
Returns:

equals

public boolean equals(java.lang.Object obj)
tests with equality to another DMC WARNING: As 'AuditTrailEntry' does so far not override the 'equals()' method this method does, as well, not check for real value equality. This needs, if necessary, to be fixed in AuditTrailEntry.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:

containsEvent

public boolean containsEvent(AbstractEvent entry)
deep check whether a given AbstractEvent is contained within this DMC's event set

Parameters:
entry -
Returns:

makeFootprintCanonical

public void makeFootprintCanonical(ObjectEquivalence equiv)
Converts all data object identifiers in the footprint to canonical representations of the data objects, following the rules implemented in the given equivalence relation implementation.

Parameters:
equiv - equivalence relation implementation used for conversion

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:
the position index of the leftmost event in this DMC

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 of the leftmost event in this DMC

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 of the rightmost event in this DMC

getProcessInstance

public ProcessInstance getProcessInstance()
Returns:
reference to the ProcessInstance all events in this DMC stem from

getIdNumber

public long getIdNumber()
Returns:
the id sequence number of this DMC

getIdString

public java.lang.String getIdString()
Returns:
the id string of this DMC

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the id string of this DMC

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:

isConsistent

public boolean isConsistent(ObjectEquivalence equiv)
checks the inner consistency of a DMC, i.e. whether for every data object contained in the footprint a corresponding event exists

Parameters:
equiv -
Returns: