|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.log.LogFilter
public abstract class LogFilter
A generic abstract class for a workflow log filter.
When reading a log, the process instances are read one by one.
The filter
method of the selected log filter is called for each process instance.
This filter
method can then modify the contents of the given process instance.
For example, certain audit trail entries can be deleted.
The process instance is completely ignored (discarded) if the filter
returns false.
The LogFilter objects can be stacked, which means that they are capable of calling eachothers
filter
method. Note that each LogFilter should call the filter
method
of the lower level filter first for efficiency reasons.
Note: this class has a natural ordering that is inconsistent with equals.
Field Summary | |
---|---|
static int |
FAST
FAST should be used if the computation time of the filter
method does not depend on the size of the process instance (i.e. |
protected LogFilter |
filter
A LogFilter with a pointer to the lower level filter. |
protected int |
load
A integer that can have three values: FAST, AVERAGE, SLOW. |
static int |
MODERATE
AVERAGE should be used if the computation time of the filter
method depends polynomially on the size of the process instance . |
static int |
SLOW
SLOW should be used if the computation time of the filter
method depends exponentially on the size of the process instance . |
Constructor Summary | |
---|---|
LogFilter(int load,
java.lang.String name)
Instantiates a LogFilter with a pointer to the lower level filter. |
Method Summary | |
---|---|
boolean |
changesLog()
Method to tell whether this LogFilter changes the log or not. |
protected abstract boolean |
doFiltering(ProcessInstance instance)
Filters a single process instance. |
boolean |
filter(ProcessInstance instance)
Filters a single process instance. |
int |
getComplexity()
Returns either SLOW, MODERATE or FAST |
java.lang.String |
getComplexityAsString()
Returns either "Slow", "Moderate" or "Fast" |
LogFilter |
getFilter()
Provides access to the lower level log filter used by this instance. |
java.lang.String |
getHelp()
Returns the help for this LogFilter as HTML text without the and tags! |
protected abstract java.lang.String |
getHelpForThisLogFilter()
Returns the help for this LogFilter as HTML text, but without the and tags! |
java.lang.String |
getName()
Returns the name of this LogFilter |
abstract LogFilterParameterDialog |
getParameterDialog(LogSummary summary)
Returns a Panel for the setting of parameters. |
protected int |
getThisLogFilterComplexity()
Returns either SLOW, MODERATE or FAST |
protected abstract void |
readSpecificXML(org.w3c.dom.Node logFilterSpecifcNode)
Read the inside of the |
static LogFilter |
readXML(org.w3c.dom.Node logFilterNode)
Read the inside of the |
void |
setLowLevelFilter(LogFilter filter)
Sets the lower level filter for this log. |
void |
setName(java.lang.String name)
Sets the name of this LogFilter |
protected abstract boolean |
thisFilterChangesLog()
Method to tell whether this LogFilter changes the log or not. |
java.lang.String |
toString()
Returns the name of this LogFilter |
protected abstract void |
writeSpecificXML(java.io.BufferedWriter output)
Write the inside of the |
void |
writeXML(java.io.BufferedWriter output)
Write the inside of the |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FAST
filter
method does not depend on the size of the process instance (i.e. it is
constant).
public static final int MODERATE
filter
method depends polynomially on the size of the process instance .
public static final int SLOW
filter
method depends exponentially on the size of the process instance .
protected int load
filter
method does not depend on the
size of the process instance (i.e. it is constant). AVERAGE if it is linear
in the size of the instance and SLOW otherwise.
protected LogFilter filter
filter(ProcessInstance pi)
method should
first call filter.filter(pi)
. If that returns false, no
further filtering is necessary.
Constructor Detail |
---|
public LogFilter(int load, java.lang.String name)
filter(ProcessInstance pi)
method should
first call filter.filter(pi)
. If that returns false, no
further filtering is necessary.
lowLevelFilter
- the filter that should be checked first, to see
if the instance can be discared anyway. Note that this filter can be null.load
- the load of this LogFilter (i.e. SLOW, AVERAGE or FAST)name
- The name of the LogFilterMethod Detail |
---|
public LogFilter getFilter()
protected abstract boolean doFiltering(ProcessInstance instance)
instance
- the process instance to filter
public final boolean filter(ProcessInstance instance)
if ((filter!=null) && !filter.filter(instance) || instance.isEmpty()) {return false;}
instance
- the process instance to filter
public final java.lang.String getName()
public final void setName(java.lang.String name)
name
- new name of this LogFilterpublic java.lang.String toString()
toString
in class java.lang.Object
protected abstract boolean thisFilterChangesLog()
compare
method.
filter()
method. False otherwise.public final boolean changesLog()
compare
method.
filter()
method, or the lower level filter does. False otherwise.public abstract LogFilterParameterDialog getParameterDialog(LogSummary summary)
getNewLogFilter
method
of the dialog.
summary
- A LogSummary to be used for setting parameters.
public final void setLowLevelFilter(LogFilter filter)
filter
- LogFilterprotected int getThisLogFilterComplexity()
public final int getComplexity()
public final java.lang.String getComplexityAsString()
public final java.lang.String getHelp()
protected abstract java.lang.String getHelpForThisLogFilter()
protected abstract void writeSpecificXML(java.io.BufferedWriter output) throws java.io.IOException
output
- OutputStream
java.io.IOException
protected abstract void readSpecificXML(org.w3c.dom.Node logFilterSpecifcNode) throws java.io.IOException
input
- InputStream
java.io.IOException
public void writeXML(java.io.BufferedWriter output) throws java.io.IOException
output
- OutputStream
java.io.IOException
public static LogFilter readXML(org.w3c.dom.Node logFilterNode) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
input
- InputStream
java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |