|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.log.LogReader
org.processmining.framework.log.classic.LogReaderClassic
public class LogReaderClassic
Reads a workflow log file.
This class allows a workflow log to be read by reading one process instance at a time. A log is explicitly not read into memory completely, to allow very large logs to be read.
A log file will be opened when it is first needed,
i.e. when next()
, hasNext()
,
reset()
or getLogSummary()
is first called.
The log file is automatically closed after the last process instance in the log is read.
When the log is first opened, a summary will be read first.
This means that the whole log will be read once before actually returning any process instances.
This summary information is available by calling the getLogSummary()
method.
Nested Class Summary | |
---|---|
class |
LogReaderClassic.LogReaderClassicIterator
|
Field Summary | |
---|---|
protected int[] |
processInstancesToKeep
|
Constructor Summary | |
---|---|
protected |
LogReaderClassic(LogFilter filter,
LogFile inputFile)
Read the given log file, filtered by the given filter. |
protected |
LogReaderClassic(LogReader oldLogReader,
int[] pitk)
Deprecated. use clone(int[]) instead . |
Method Summary | |
---|---|
LogReader |
clone(int[] pitk)
Clones this log reader, including all contained processes and process instances. |
static LogReader |
createInstance(LogFilter filter,
LogFile inputFile)
Read the given log file, filtered by the given filter. |
static LogReader |
createInstance(LogReader oldLogReader,
int[] pitk)
Deprecated. use clone(int[]) instead . |
static LogReader |
createInstance(LogReader reader,
LogFilter filter)
Derive a new log reader, based on the given log reader and filtered by the given filter. |
LogFile |
getFile()
Returns the log file instance that was given in the constructor. |
ProcessInstance |
getInstance(int index)
Retrieves the process instance located at the given index within the encapsulated log file. |
LogFilter |
getLogFilter()
Returns the filter instance that was given in the constructor. |
LogSummary |
getLogSummary()
Returns a LogSummary object with summarized info about the
workflow log. |
Process |
getProcess(int index)
Retrieves the process located at the given index within the encapsulated log file. |
boolean |
hasNext()
Iterator interface method. |
java.util.Iterator |
instanceIterator()
Retrieves an iterator over the process instances contained in the encapsulated log file. |
boolean |
isSelection()
Tells whether or not this logReader object represents a selection of a log, instead of a complete log. |
ProcessInstance |
next()
Iterator interface method. |
int |
numberOfInstances()
Retrieves the number of process instances contained in this log file. |
int |
numberOfProcesses()
Retrieves the number of processes contained in this log file. |
int[] |
processInstancesToKeep()
Retrieves the indices of process instances which are not excluded from reading. |
java.util.Iterator |
processIterator()
Retrieves an iterator over the processes contained in the encapsulated log file. |
void |
reset()
Iterator interface method. |
java.lang.String |
toString()
Returns a string representation of this log reader instance. |
Methods inherited from class org.processmining.framework.log.LogReader |
---|
getInstances |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] processInstancesToKeep
Constructor Detail |
---|
protected LogReaderClassic(LogFilter filter, LogFile inputFile)
filter
- the filter to use for filtering the log fileinputFile
- the log file to readprotected LogReaderClassic(LogReader oldLogReader, int[] pitk)
clone(int[]) instead
.
oldLogReader
- the original log readerpitk
- the process instances to keepMethod Detail |
---|
public static LogReader createInstance(LogReader reader, LogFilter filter) throws java.lang.Exception
filter
- the filter to use for filtering the log fileinputFile
- the log file to read
java.lang.Exception
public static LogReader createInstance(LogFilter filter, LogFile inputFile)
filter
- the filter to use for filtering the log fileinputFile
- the log file to readpublic static LogReader createInstance(LogReader oldLogReader, int[] pitk) throws java.lang.Exception
clone(int[]) instead
.
oldLogReader
- the original log readerpitk
- the process instances to keep
java.lang.Exception
public java.lang.String toString()
LogReader
toString
in class LogReader
public boolean isSelection()
LogReader
isSelection
in class LogReader
public LogFile getFile()
LogReader
getFile
in class LogReader
public LogFilter getLogFilter()
LogReader
getLogFilter
in class LogReader
public LogSummary getLogSummary()
LogReader
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.
getLogSummary
in class LogReader
LogSummary
object with summarized info about the
workflow logpublic boolean hasNext()
LogReader
Probes whether the log reader has another process instance available for reading.
hasNext
in class LogReader
public ProcessInstance next()
LogReader
Retrieves the next process instance from the log.
next
in class LogReader
public void reset()
LogReader
Resets the main iterator to the first process instance.
reset
in class LogReader
public int[] processInstancesToKeep()
LogReader
processInstancesToKeep
in class LogReader
public int numberOfInstances()
LogReader
numberOfInstances
in class LogReader
public ProcessInstance getInstance(int index)
LogReader
getInstance
in class LogReader
index
- index of the requested process instance in the log
public LogReader clone(int[] pitk)
LogReader
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.
clone
in class LogReader
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.
public Process getProcess(int index)
LogReader
getProcess
in class LogReader
index
- index of the requested process in the log
public java.util.Iterator instanceIterator()
LogReader
instanceIterator
in class LogReader
public int numberOfProcesses()
LogReader
numberOfProcesses
in class LogReader
public java.util.Iterator processIterator()
LogReader
processIterator
in class LogReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |