org.processmining.framework.log.rfb
Class LogData

java.lang.Object
  extended by org.processmining.framework.log.rfb.LogData

public class LogData
extends java.lang.Object

This class servers as a simple abstract data type, or container, holding a set of processes and referring instances. No abstract access, or meta information, is provided (in contrast to e.g. a log reader).

The purpose is to provide a means to store and exchange event log data in its pure form. It is further equipped with a lightweight log summary, which is transparently adjusted when a log filter is applied to the set.

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

Nested Class Summary
protected  class LogData.MxmlHandler
          This class iplements a SAX2 handler for sequential parsing of MXML documents.
 
Field Summary
protected  java.util.ArrayList<ProcessInstanceImpl> instances
          Holds references to the stored process instances.
protected  java.util.ArrayList<ProcessImpl> processes
          Holds references to the stored processes.
protected  LightweightLogSummary summary
          Holds the log summary describing the contained log information.
 
Constructor Summary
protected LogData(java.util.ArrayList<ProcessImpl> processes, java.util.ArrayList<ProcessInstanceImpl> instances, LightweightLogSummary summary)
          Simple protected constructor.
 
Method Summary
static LogData createInstance()
          Creates a new instance with empty sets.
static LogData createInstance(java.util.ArrayList<ProcessImpl> processes, java.util.ArrayList<ProcessInstanceImpl> instances, LightweightLogSummary summary)
          Creates a new instance with the provided lists as data set.
static LogData createInstance(LogData template, int[] processInstancesToKeep)
          Creates a new instance, which is a filtered, deep copy, i.e.
static LogData createInstance(LogData template, LogFilter filter)
          Creates a new instance, which is a filtered, deep copy, i.e.
static LogData createInstance(LogFile file)
          This method creates a new log data container instance directly from parsing a supplied MXML log file.
protected  void ensureIntegrity()
           
 java.util.ArrayList<ProcessInstanceImpl> instances()
          Provides direct access to the list of contained process instances.
 java.util.ArrayList<ProcessImpl> processes()
          Provides direct access to the list of contained Processes.
 LightweightLogSummary summary()
          Provides direct access to the summary describing the contained event log data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processes

protected java.util.ArrayList<ProcessImpl> processes
Holds references to the stored processes.


instances

protected java.util.ArrayList<ProcessInstanceImpl> instances
Holds references to the stored process instances.


summary

protected LightweightLogSummary summary
Holds the log summary describing the contained log information.

Constructor Detail

LogData

protected LogData(java.util.ArrayList<ProcessImpl> processes,
                  java.util.ArrayList<ProcessInstanceImpl> instances,
                  LightweightLogSummary summary)
Simple protected constructor.

Parameters:
processes - Processes to store.
instances - Process instances to store.
Method Detail

createInstance

public static LogData createInstance()
Creates a new instance with empty sets.

Returns:
A new empty instance.

createInstance

public static LogData createInstance(java.util.ArrayList<ProcessImpl> processes,
                                     java.util.ArrayList<ProcessInstanceImpl> instances,
                                     LightweightLogSummary summary)
Creates a new instance with the provided lists as data set.

Parameters:
processes - List of processes to include.
instances - List of process instances to include.
summary - Log summary describing the provided data.
Returns:
Newly created instance.

createInstance

public static LogData createInstance(LogData template,
                                     LogFilter filter)
                              throws java.io.IOException
Creates a new instance, which is a filtered, deep copy, i.e. clone, of the provided template instance.

Parameters:
template - Template instance, from which the event log data is used.
filter - Log filter which is applied to the template data.
Returns:
Newly created, filtered clone of the template instance.
Throws:
java.io.IOException

createInstance

public static LogData createInstance(LogData template,
                                     int[] processInstancesToKeep)
                              throws java.io.IOException
Creates a new instance, which is a filtered, deep copy, i.e. clone, of the provided template instance. The clone will only contain the instances of the template, of which indices are contained in the provided integer array.

Parameters:
template - Template instance, from which the event log data is used.
processInstancesToKeep - Array of integer indices indicating the process instances in the template to be retained in the clone.
Returns:
Newly created, filtered clone of the template instance.
Throws:
java.io.IOException

createInstance

public static LogData createInstance(LogFile file)
                              throws javax.xml.parsers.ParserConfigurationException,
                                     org.xml.sax.SAXException,
                                     java.io.IOException
This method creates a new log data container instance directly from parsing a supplied MXML log file. No filtering, or other log-distorting operations, is performed, so that the resulting log data container truthfully represents the parsed log file.

Parameters:
file - Log file to be parsed in MXML format.
Returns:
The newly created log data container.
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

processes

public java.util.ArrayList<ProcessImpl> processes()
Provides direct access to the list of contained Processes.

Returns:
The list of contained processes.

instances

public java.util.ArrayList<ProcessInstanceImpl> instances()
Provides direct access to the list of contained process instances.

Returns:
The list of contained process instances.

summary

public LightweightLogSummary summary()
Provides direct access to the summary describing the contained event log data.

Returns:

ensureIntegrity

protected void ensureIntegrity()
                        throws java.lang.IndexOutOfBoundsException,
                               java.io.IOException
Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException