org.processmining.framework.log
Class LogReader

java.lang.Object
  extended by org.processmining.framework.log.LogReader
Direct Known Subclasses:
BufferedLogReader, LogReaderClassic, ProxyLogReader

public abstract class LogReader
extends java.lang.Object

Interface for log reading and modification access to process event logs.

Author:
christian

Constructor Summary
LogReader()
           
 
Method Summary
abstract  LogReader clone(int[] pitk)
          Clones this log reader, including all contained processes and process instances.
static LogReader createInstance(LogFilter filter, LogFile file)
          Factory method prototype.
static LogReader createInstance(LogReader reader, int[] processInstancesToKeep)
          Factory method prototype.
static LogReader createInstance(LogReader reader, LogFilter filter)
          Factory method prototype.
abstract  LogFile getFile()
          Returns the log file instance that was given in the constructor.
abstract  ProcessInstance getInstance(int index)
          Retrieves the process instance located at the given index within the encapsulated log file.
 java.util.List<ProcessInstance> getInstances()
           
abstract  LogFilter getLogFilter()
          Returns the filter instance that was given in the constructor.
abstract  LogSummary getLogSummary()
          Returns a LogSummary object with summarized info about the workflow log.
abstract  Process getProcess(int index)
          Retrieves the process located at the given index within the encapsulated log file.
abstract  boolean hasNext()
          Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!
abstract  java.util.Iterator instanceIterator()
          Retrieves an iterator over the process instances contained in the encapsulated log file.
abstract  boolean isSelection()
          Tells whether or not this logReader object represents a selection of a log, instead of a complete log.
abstract  ProcessInstance next()
          Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!
abstract  int numberOfInstances()
          Retrieves the number of process instances contained in this log file.
abstract  int numberOfProcesses()
          Retrieves the number of processes contained in this log file.
abstract  int[] processInstancesToKeep()
          Retrieves the indices of process instances which are not excluded from reading.
abstract  java.util.Iterator processIterator()
          Retrieves an iterator over the processes contained in the encapsulated log file.
abstract  void reset()
          Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!
abstract  java.lang.String toString()
          Returns a string representation of this log reader instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogReader

public LogReader()
Method Detail

createInstance

public static LogReader createInstance(LogReader reader,
                                       LogFilter filter)
                                throws java.lang.Exception
Factory method prototype.

Notice: You have to override this method in your log reader implementation, as instances will always be created using a static factory method within ProM.

Parameters:
reader - A log reader on whose log the new log reader is based.
filter - The LogFilter to use for the created log reader.
Returns:
Throws:
java.lang.Exception

createInstance

public static LogReader createInstance(LogFilter filter,
                                       LogFile file)
                                throws java.lang.Exception
Factory method prototype.

Notice: You have to override this method in your log reader implementation, as instances will always be created using a static factory method within ProM.

Parameters:
filter - The LogFilter to use for the created log reader.
file - The file to back the created log reader.
Returns:
Throws:
java.lang.Exception

createInstance

public static LogReader createInstance(LogReader reader,
                                       int[] processInstancesToKeep)
                                throws java.lang.Exception
Factory method prototype.

Notice: You have to override this method in your log reader implementation, as instances will always be created using a static factory method within ProM.

Parameters:
reader - The log reader from which the newly created instance inherits its setting and configuration (filter, file, etc.).
processInstancesToKeep - Indices of the process instances, which are to be contained in the newly created log reader.
Returns:
Throws:
java.lang.Exception

clone

public abstract LogReader clone(int[] pitk)
Clones this log reader, including all contained processes and process instances. The contained process instances, whose indices are contained in the given integer array, are excluded and will not be contained in the returned clone.

Notice that this method will yield a deep copy of the cloned instance. This implies doubling this instance's memory consumption (either in random access memory or filesystem space consumption, depending on the implementation) and no synchronization of changes between original and clone.

Parameters:
pitk - The contained process instances, whose indices are contained in the given integer array, are excluded and will not be contained in the returned clone.
Returns:
A clone of this log reader, excluding the process instances whose indices are given in the supplied array.

toString

public abstract java.lang.String toString()
Returns a string representation of this log reader instance.

Overrides:
toString in class java.lang.Object
Returns:

isSelection

public abstract boolean isSelection()
Tells whether or not this logReader object represents a selection of a log, instead of a complete log.

Returns:
true if it it a selection

getFile

public abstract LogFile getFile()
Returns the log file instance that was given in the constructor.

Returns:
the log file instance that was given in the constructor

getLogFilter

public abstract LogFilter getLogFilter()
Returns the filter instance that was given in the constructor.

Returns:
the filter instance that was given in the constructor

getLogSummary

public abstract LogSummary getLogSummary()
Returns a LogSummary object with summarized info about the workflow log. Note that, if a filter is used, any information provided in this object is based on the filtered log, not on the real contents of the log file.

Returns:
a LogSummary object with summarized info about the workflow log

processInstancesToKeep

public abstract int[] processInstancesToKeep()
Retrieves the indices of process instances which are not excluded from reading.

Returns:

instanceIterator

public abstract java.util.Iterator instanceIterator()
Retrieves an iterator over the process instances contained in the encapsulated log file.

Returns:
an iterator over the contained process instances.

getInstances

public java.util.List<ProcessInstance> getInstances()

numberOfInstances

public abstract int numberOfInstances()
Retrieves the number of process instances contained in this log file.

Returns:
the number of process instances contained in this log file.

getInstance

public abstract ProcessInstance getInstance(int index)
Retrieves the process instance located at the given index within the encapsulated log file.

Parameters:
index - index of the requested process instance in the log
Returns:
referenced process instance.

processIterator

public abstract java.util.Iterator processIterator()
Retrieves an iterator over the processes contained in the encapsulated log file.

Returns:
an iterator over the contained processes.

numberOfProcesses

public abstract int numberOfProcesses()
Retrieves the number of processes contained in this log file.

Returns:
the number of processes contained in this log file.

getProcess

public abstract Process getProcess(int index)
Retrieves the process located at the given index within the encapsulated log file.

Parameters:
index - index of the requested process in the log
Returns:
referenced process.

hasNext

public abstract boolean hasNext()
Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!

Iterator interface method.

Probes whether the log reader has another process instance available for reading.

Returns:

next

public abstract ProcessInstance next()
Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!

Iterator interface method.

Retrieves the next process instance from the log.

Returns:
The next process instance from the log.

reset

public abstract void reset()
Deprecated. If you prefer to use iterator access to process instances, use the instanceIterator() method instead!

Iterator interface method.

Resets the main iterator to the first process instance.