org.processmining.framework.log.filter
Class RemapElementLogFilter

java.lang.Object
  extended by org.processmining.framework.log.LogFilter
      extended by org.processmining.framework.log.filter.RemapElementLogFilter

public class RemapElementLogFilter
extends LogFilter

Log filter for remapping log event names to replacement strings, based on the matching of given regular expressions.

Author:
Christian W. Guenther (christian@deckfour.org)

Field Summary
protected  java.util.ArrayList<java.util.regex.Pattern> patternList
           
protected  java.util.ArrayList<java.lang.String> replacementList
           
 
Fields inherited from class org.processmining.framework.log.LogFilter
FAST, filter, load, MODERATE, SLOW
 
Constructor Summary
RemapElementLogFilter()
           
RemapElementLogFilter(java.util.ArrayList<java.util.regex.Pattern> aPatternList, java.util.ArrayList<java.lang.String> aReplacementList)
           
 
Method Summary
protected  boolean doFiltering(ProcessInstance instance)
          Filters a single process instance.
protected  java.lang.String getHelpForThisLogFilter()
          Returns the help for this LogFilter as HTML text, but without the and tags!
 LogFilterParameterDialog getParameterDialog(LogSummary summary)
          Returns a Panel for the setting of parameters.
 java.util.ArrayList<java.util.regex.Pattern> getPatternList()
           
 java.util.ArrayList<java.lang.String> getReplacementList()
           
 java.lang.String match(java.lang.String element)
           
protected  void readSpecificXML(org.w3c.dom.Node logFilterSpecificNode)
          Read the inside of the tag in the XML export file from the InputStream input.
protected  boolean thisFilterChangesLog()
          Method to tell whether this LogFilter changes the log or not.
protected  void writeSpecificXML(java.io.BufferedWriter output)
          Write the inside of the tag in the XML export file to the OutputStream output.
 
Methods inherited from class org.processmining.framework.log.LogFilter
changesLog, filter, getComplexity, getComplexityAsString, getFilter, getHelp, getName, getThisLogFilterComplexity, readXML, setLowLevelFilter, setName, toString, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

patternList

protected java.util.ArrayList<java.util.regex.Pattern> patternList

replacementList

protected java.util.ArrayList<java.lang.String> replacementList
Constructor Detail

RemapElementLogFilter

public RemapElementLogFilter()

RemapElementLogFilter

public RemapElementLogFilter(java.util.ArrayList<java.util.regex.Pattern> aPatternList,
                             java.util.ArrayList<java.lang.String> aReplacementList)
Method Detail

getPatternList

public java.util.ArrayList<java.util.regex.Pattern> getPatternList()

getReplacementList

public java.util.ArrayList<java.lang.String> getReplacementList()

match

public java.lang.String match(java.lang.String element)

doFiltering

protected boolean doFiltering(ProcessInstance instance)
Description copied from class: LogFilter
Filters a single process instance. The process instance can be modified.

Specified by:
doFiltering in class LogFilter
Parameters:
instance - the process instance to filter
Returns:
true if the whole process instance passes the filter, false if the process instance should be discarded.

getHelpForThisLogFilter

protected java.lang.String getHelpForThisLogFilter()
Description copied from class: LogFilter
Returns the help for this LogFilter as HTML text, but without the and tags!

Specified by:
getHelpForThisLogFilter in class LogFilter
Returns:
the help as string

getParameterDialog

public LogFilterParameterDialog getParameterDialog(LogSummary summary)
Description copied from class: LogFilter
Returns a Panel for the setting of parameters. When a LogFilter can be added to a list in the framework. This panel is shown, and parameters can be set. When the dialog is closed, a new instance of a LogFilter is created by the framework by calling the getNewLogFilter method of the dialog.

Specified by:
getParameterDialog in class LogFilter
Parameters:
summary - A LogSummary to be used for setting parameters.
Returns:
JPanel

thisFilterChangesLog

protected boolean thisFilterChangesLog()
Description copied from class: LogFilter
Method to tell whether this LogFilter changes the log or not. This method is used in the compare method.

Specified by:
thisFilterChangesLog in class LogFilter
Returns:
boolean True if this LogFilter changes the process instance in the filter() method. False otherwise.

writeSpecificXML

protected void writeSpecificXML(java.io.BufferedWriter output)
                         throws java.io.IOException
Description copied from class: LogFilter
Write the inside of the tag in the XML export file to the OutputStream output.

Specified by:
writeSpecificXML in class LogFilter
Parameters:
output - OutputStream
Throws:
java.io.IOException

readSpecificXML

protected void readSpecificXML(org.w3c.dom.Node logFilterSpecificNode)
                        throws java.io.IOException
Description copied from class: LogFilter
Read the inside of the tag in the XML export file from the InputStream input.

Specified by:
readSpecificXML in class LogFilter
Throws:
java.io.IOException