|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.models.petrinet.algorithms.logReplay.ReplayedLogReader
public class ReplayedLogReader
A log reader involved in the log replay analysis method.
It can be traversed with methods like reset(), hasNext(), and next() like
with the LogReader class.
Furthermore is used to extend the log reader interface with some more
log access related methods, like finding a process instance by its ID.
Note that this implies that the whole log is kept in memory (this is not
the case for the LogReader class), which can be problematic as soon as the
log file becomes very big.
However, since this class is intended to derive subclasses which will store
diagnostic information for each of the traces this will happen anyway.
ReplayedLogTrace
,
ReplayedPetriNet
,
LogReplayAnalysisMethod
Field Summary | |
---|---|
protected java.util.Iterator |
logIterator
Step through the diagnostic log offering access to the diagnostic log traces via methods like reset(), hasNext(), and next(). |
protected java.util.HashMap |
logTraceMap
Alternative data structure directly accessing all the diagnostic log traces contained in that log by their ID (i.e., their name). |
protected java.util.ArrayList |
logTraces
The list of diagnostic log traces contained in that log. |
protected LogReader |
originalLogReader
The encapsulated original log reader, which was used to create this enhanced log reader. |
protected java.util.ArrayList |
sortedTraceList
List containing all log traces sorted with respect to the number of process instances represented by them in a descending manner (i.e., the trace representing the most process instances comes first, the one representing the least comes last). |
Constructor Summary | |
---|---|
ReplayedLogReader(LogReader logReader)
Construct an enhanced log reader by wrapping the original one. |
Method Summary | |
---|---|
protected ReplayedLogTrace |
createReplayedLogTrace(ProcessInstance pi)
Wrappes the given process instance in a ReplayedLogTrace. |
java.util.ArrayList |
getDiagnosticLogTraces()
Get the list of diagnostic log traces contained in that log. |
int |
getIndexOfLogTrace(java.lang.String id)
Determines the index of the given trace with respect to the ordering of the log file. |
LogReader |
getLogReader()
Returns the encapsulated log reader. |
LogSummary |
getLogSummary()
Retrieves the log summary from the internally held LogReader
to, e.g., find the corresponding log event for an audit trail entry. |
ReplayedLogTrace |
getLogTrace(java.lang.String id)
Finds a specific trace in the log. |
java.util.ArrayList |
getLogTraceIDs()
Creates a list of all the log trace IDs contained in the log. |
java.util.ArrayList |
getMostFrequentTraces(int perCentage)
Gets the most frequent log traces determined by the given percentage from the log. |
int |
getOverallNumberOfProcessInstances()
Returns the number of process instances represented by the aggregrated log traces (taking the number of instances represented by each trace into account). |
int |
getPercentage(java.util.ArrayList selectedTraces)
Calculates the (rounded) percentage of process instances represented by the given log traces with respect to the whole log. |
int |
getSizeOfLog()
Returns the number of traces contained in the log. |
boolean |
hasNext()
Determines whether there is a log trace left to be read by the diagnostic log reader (i.e., the iterator is not yet located after the last element). |
ReplayedLogTrace |
next()
Reads the current diagnostic log trace and move to the next one (i.e., fetch the next element and place the iterator in behind it). |
void |
reset()
Resets the diagnostic log reader to its start position (i.e., the iterator is placed in front of the first element). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LogReader originalLogReader
protected java.util.ArrayList logTraces
protected java.util.HashMap logTraceMap
protected java.util.ArrayList sortedTraceList
protected java.util.Iterator logIterator
Constructor Detail |
---|
public ReplayedLogReader(LogReader logReader)
logReader
- the original log readerMethod Detail |
---|
protected ReplayedLogTrace createReplayedLogTrace(ProcessInstance pi)
pi
- the process instance to be wrapped
public java.util.ArrayList getDiagnosticLogTraces()
public LogReader getLogReader()
public void reset()
getLogReader()
but over the log traces enhanced with diagnostic information.
public boolean hasNext()
getLogReader()
but over the log traces enhanced with diagnostic information.
true
if there is a trace to be read, false
otherwisepublic ReplayedLogTrace next()
getLogReader()
but over the log traces enhanced with diagnostic information.
public ReplayedLogTrace getLogTrace(java.lang.String id)
id
- the ID of the trace (accessible by getName()) in the log
null
otherwisepublic int getIndexOfLogTrace(java.lang.String id)
id
- the ID of the trace (accessible by getName()) in the log
public java.util.ArrayList getLogTraceIDs()
public java.util.ArrayList getMostFrequentTraces(int perCentage)
perCentage
- the percentage ranging from 1 to 100
public int getPercentage(java.util.ArrayList selectedTraces)
selectedTraces
- the log traces (specified by their ID) for which
the percentage is to be calculated
public int getSizeOfLog()
public int getOverallNumberOfProcessInstances()
public LogSummary getLogSummary()
LogReader
to, e.g., find the corresponding log event for an audit trail entry.
LogSummary
of the log
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |