Class LogFilter


  • public class LogFilter
    extends java.lang.Object
    Class containing some static methods that are easy to use when implementing a new filter on a log.
    Author:
    bfvdonge
    • Constructor Summary

      Constructors 
      Constructor Description
      LogFilter()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XEventCondition eventCondition)
      This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false.
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XEventCondition eventCondition, XTraceCondition traceCondition)
      This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false.
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XEventEditor eventEditor)
      This method filters a log by editing the XEvent objects from all XTrace object in the given XLog.
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XEventEditor eventEditor, XTraceEditor traceEditor)
      This method filters a log by editing the XEvent objects from all XTrace object in the given XLog.
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XTraceCondition traceCondition)
      This method filters a log by checking the given XTrace condition on each trance.
      static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log, XTraceEditor traceEditor)
      This method filters a log by editing all XTrace objects in the given XLog.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XEventCondition eventCondition)
      This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XEventCondition eventCondition, XTraceCondition traceCondition)
      This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XEventEditor eventEditor)
      This method filters a log by editing the XEvent objects from all XTrace object in the given XLog.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XEventEditor eventEditor, XTraceEditor traceEditor)
      This method filters a log by editing the XEvent objects from all XTrace object in the given XLog.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XTraceCondition traceCondition)
      This method filters a log by checking the given XTrace condition on each trance.
      static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress, int steps, org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, XTraceEditor traceEditor)
      This method filters a log by editing all XTrace objects in the given XLog.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LogFilter

        public LogFilter()
    • Method Detail

      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XEventCondition eventCondition,
                                                         XTraceCondition traceCondition)
        This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false. After that, the given XTrace condition is checked on the filtered trace and the trace is removed if this condition returns false.
        Parameters:
        log - The log that needs to be filtered.
        eventCondition - The condition that is checked for all events in the log.
        traceCondition - The condition that is checked for all traces in the log. Note that on each trace, the eventCondition is first checked on all events, and then the trace condition is checked on the filtered trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XEventCondition eventCondition,
                                                         XTraceCondition traceCondition)
        This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false. After that, the given XTrace condition is checked on the filtered trace and the trace is removed if this condition returns false.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        eventCondition - The condition that is checked for all events in the log.
        traceCondition - The condition that is checked for all traces in the log. Note that on each trace, the eventCondition is first checked on all events, and then the trace condition is checked on the filtered trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XTraceCondition traceCondition)
        This method filters a log by checking the given XTrace condition on each trance. The trace is removed if this condition returns false.
        Parameters:
        log - The log that needs to be filtered.
        traceCondition - The condition that is checked for all traces in the log. Note that on each trace, the eventCondition is first checked on all events, and then the trace condition is checked on the filtered trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XTraceCondition traceCondition)
        This method filters a log by checking the given XTrace condition on each trance. The trace is removed if this condition returns false.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        traceCondition - The condition that is checked for all traces in the log. Note that on each trace, the eventCondition is first checked on all events, and then the trace condition is checked on the filtered trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XEventCondition eventCondition)
        This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false. After that, the filtered trace is removed if it remains empty.
        Parameters:
        log - The log that needs to be filtered.
        eventCondition - The condition that is checked for all events in the log.
        Returns:
        the filtered log
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XEventCondition eventCondition)
        This method filters a log by removing XEvent objects from all XTrace object in the given XLog, if the given XEventCondition returns false. After that, the filtered trace is removed if it remains empty.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        eventCondition - The condition that is checked for all events in the log.
        Returns:
        the filtered log
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XEventEditor eventEditor,
                                                         XTraceEditor traceEditor)
                                                  throws LogFilterException
        This method filters a log by editing the XEvent objects from all XTrace object in the given XLog. XEvent objects are removed if the given XEventEditor returns null. If a new XEvent object is returned by the XEventEditor, then the original XEvent is replaced by the new XEvent. After editing all events, the filtered trace is removed if it remains empty. If it is not empty, then it is provided to the given XTraceEditor for editing. If this editor returns null, the trace is removed. If this editor returns a new XTrace object, the original XTrace is replaces.
        Parameters:
        log - The log that needs to be filtered.
        eventEditor - The editor that is applied to all XEvents in the log
        traceEditor - The editor that is applied to each trace. Note that first all events are edited and that the trace editor is then applied to the filtered trace, if it is not empty.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XEventEditor eventEditor,
                                                         XTraceEditor traceEditor)
                                                  throws LogFilterException
        This method filters a log by editing the XEvent objects from all XTrace object in the given XLog. XEvent objects are removed if the given XEventEditor returns null. If a new XEvent object is returned by the XEventEditor, then the original XEvent is replaced by the new XEvent. After editing all events, the filtered trace is removed if it remains empty. If it is not empty, then it is provided to the given XTraceEditor for editing. If this editor returns null, the trace is removed. If this editor returns a new XTrace object, the original XTrace is replaces.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        eventEditor - The editor that is applied to all XEvents in the log
        traceEditor - The editor that is applied to each trace. Note that first all events are edited and that the trace editor is then applied to the filtered trace, if it is not empty.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException - if an XTraceEditor returns a new trace.
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XTraceEditor traceEditor)
                                                  throws LogFilterException
        This method filters a log by editing all XTrace objects in the given XLog. Each XTrace object is provided to the given XTraceEditor for editing. If this editor returns null, the trace is removed. If this editor returns a new XTrace object, the original XTrace is replaces.
        Parameters:
        log - The log that needs to be filtered.
        traceEditor - The editor that is applied to each trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XTraceEditor traceEditor)
                                                  throws LogFilterException
        This method filters a log by editing all XTrace objects in the given XLog. Each XTrace object is provided to the given XTraceEditor for editing. If this editor returns null, the trace is removed. If this editor returns a new XTrace object, the original XTrace is replaces.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        traceEditor - The editor that is applied to each trace.
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.deckfour.xes.model.XLog log,
                                                         XEventEditor eventEditor)
                                                  throws LogFilterException
        This method filters a log by editing the XEvent objects from all XTrace object in the given XLog. XEvent objects are removed if the given XEventEditor returns null. If a new XEvent object is returned by the XEventEditor, then the original XEvent is replaced by the new XEvent. After editing, the filtered trace is removed if it remains empty.
        Parameters:
        log - The log that needs to be filtered.
        eventEditor - The editor that is applied to all XEvents in the log
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException
      • filter

        public static org.deckfour.xes.model.XLog filter​(org.processmining.framework.plugin.Progress progress,
                                                         int steps,
                                                         org.deckfour.xes.model.XLog log,
                                                         org.deckfour.xes.info.XLogInfo summary,
                                                         XEventEditor eventEditor)
                                                  throws LogFilterException
        This method filters a log by editing the XEvent objects from all XTrace object in the given XLog. XEvent objects are removed if the given XEventEditor returns null. If a new XEvent object is returned by the XEventEditor, then the original XEvent is replaced by the new XEvent. After editing, the filtered trace is removed if it remains empty.
        Parameters:
        progress - A Progress object which is used for showing progress. steps steps are added to the maximum and progress is increased in steps steps. May be null.
        steps - The number of steps in which progress is provided. Should be > 0
        log - The log that needs to be filtered.
        summary - The summary of the log. Is used to determine the number of events in the log. If null, it will be constructed if progress is not null.
        eventEditor - The editor that is applied to all XEvents in the log
        Returns:
        the filtered log. The result is a clone of the input log, i.e. the given log object does not change
        Throws:
        LogFilterException