org.processmining.mining.dmcscanning
Class Admc

java.lang.Object
  extended by org.processmining.mining.dmcscanning.Admc
All Implemented Interfaces:
java.lang.Comparable

public class Admc
extends java.lang.Object
implements java.lang.Comparable

Aggregate Data Modification Cluster (ADMC) Contains a set of DMCs all modifying the same set of data objects (footprint), regardless of order and modification type etc.

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

Field Summary
protected  java.util.HashSet<Dmc> dmcs
          member attributes
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
           
 
Constructor Summary
Admc()
          constructor
Admc(Admc other)
          copy constructor
Admc(java.lang.String id)
          constructor
 
Method Summary
 boolean addIfMatches(Dmc aDmc)
          Attempts to add a DMC to this aggregate set if footprints match.
 void addOverridingChecks(Dmc aDmc, Footprint aFootprint)
          Adds a DMC to the ADMC set regardless of its content and footprint.
 java.util.Iterator<Dmc> allInProcessInstanceIterator(java.lang.String processId, java.lang.String processInstanceId)
           
 int compareTo(java.lang.Object arg0)
           
 boolean conflicts(Admc anAdmc)
          Checks for a conflict between this ADMC and another ADMC.
 boolean conflicts(Dmc aDmc)
          Checks the set of DMCs contained within this ADMC for conflict with another DMC.
 java.util.HashSet<ProcessInstance> coveredProcessInstances()
           
 boolean equals(java.lang.Object obj)
          overriding Object's equal method
 Footprint footprint()
           
 java.util.HashSet<Dmc> getAllInProcessInstance(java.lang.String processId, java.lang.String processInstanceId)
          Retrieves all DMCs in this ADMC within a specific process instance
 java.util.HashSet<Dmc> getDMCs()
           
 long getIdNumber()
           
 java.lang.String getIdString()
           
 java.util.Iterator<Dmc> iterator()
           
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


dmcs

protected java.util.HashSet<Dmc> dmcs
member attributes


footprint

protected Footprint footprint

id_nr

protected long id_nr

id_string

protected java.lang.String id_string
Constructor Detail

Admc

public Admc()
constructor


Admc

public Admc(java.lang.String id)
constructor

Parameters:
id - custom id string for this ADMC

Admc

public Admc(Admc other)
copy constructor

Parameters:
other -
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


getDMCs

public java.util.HashSet<Dmc> getDMCs()
Returns:
DMCS contained within this ADMC

iterator

public java.util.Iterator<Dmc> iterator()
Returns:
iterator of DMCs contained

size

public int size()
Returns:
number of DMCs contained

footprint

public Footprint footprint()
Returns:
this ADMCs footprint, i.e. the set of modified data objects

addIfMatches

public boolean addIfMatches(Dmc aDmc)
Attempts to add a DMC to this aggregate set if footprints match.

Parameters:
dmc - the DMC to add
Returns:
whether DMC was inserted

addOverridingChecks

public void addOverridingChecks(Dmc aDmc,
                                Footprint aFootprint)
Adds a DMC to the ADMC set regardless of its content and footprint. WARNING: This method is intended for use by more sophisticated AggregationMethods. It can be used in case the ADMC as is does not naiively match the footprint of the DMC to be added. It is up to the AggregationMethod to take care of the following necessities, as these are not provided within the implementation of this method: - test for and resolve potential conflicts between DMCs - test overall compatibility with all contained DMCs and the ADMC itself - potentially adjust the DMC to be added - potentially adjust previously contained DMCs - derive the ADMC's new footprint and supply it

Parameters:
aDmc - the new DMC to be added
aFootprint - the new footprint of the ADMC, calculated externally!

conflicts

public boolean conflicts(Dmc aDmc)
Checks the set of DMCs contained within this ADMC for conflict with another DMC.

Parameters:
aDmc -
Returns:

conflicts

public boolean conflicts(Admc anAdmc)
Checks for a conflict between this ADMC and another ADMC. A conflict between two ADMCs is present, if any DMC from one ADMC is in conflict with any DMC from the other ADMC, thus this test is performed recursively.

Parameters:
anAdmc -
Returns:

getIdNumber

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

getIdString

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

toString

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

getAllInProcessInstance

public java.util.HashSet<Dmc> getAllInProcessInstance(java.lang.String processId,
                                                      java.lang.String processInstanceId)
Retrieves all DMCs in this ADMC within a specific process instance

Parameters:
processId - id of the process to look up
processInstanceId - id of the process instance to look up
Returns:
ArrayList containing all matching ADMCs

allInProcessInstanceIterator

public java.util.Iterator<Dmc> allInProcessInstanceIterator(java.lang.String processId,
                                                            java.lang.String processInstanceId)
Parameters:
processId - id of the process to look up
processInstanceId - id of the process instance to look up
Returns:
Iterator on all DMCs within a specific process instance

coveredProcessInstances

public java.util.HashSet<ProcessInstance> coveredProcessInstances()
Returns:
a sorted set of all process instances (as references) the contained DMCs stem from

equals

public boolean equals(java.lang.Object obj)
overriding Object's equal method

Overrides:
equals in class java.lang.Object

compareTo

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