org.processmining.mining.dmcscanning.logutils.filter
Class TimestampFilter

java.lang.Object
  extended by org.processmining.mining.dmcscanning.logutils.filter.TimestampFilter
All Implemented Interfaces:
EventFilter

public class TimestampFilter
extends java.lang.Object
implements EventFilter

Event filter matching all events before, after or at a given date. For creating date-based range filters, compose two of these (left & right boundary)

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected static int IS_AFTER
           
protected static int IS_BEFORE
           
protected static int IS_EXACTLY
           
protected  int mode
           
protected  java.util.Date timestamp
           
 
Constructor Summary
protected TimestampFilter()
           
protected TimestampFilter(java.util.Date aTimestamp, int aMode)
          protected constructor - use factory methods!
 
Method Summary
static TimestampFilter after(java.util.Date aTimestamp)
          Factory method: matches all events after a given date
static TimestampFilter after(long aTimeMillis)
          Factory method: matches all events after a given date in milliseconds
static TimestampFilter before(java.util.Date aTimestamp)
          Factory method: matches all events before a given date
static TimestampFilter before(long aTimeMillis)
          Factory method: matches all events before a given date in milliseconds
static TimestampFilter exactly(java.util.Date aTimestamp)
          Factory method: matches all events exactly at a given date
static TimestampFilter exactly(long aTimeMillis)
          Factory method: matches all events exactly at a given date in milliseconds
 boolean matches(AuditTrailEntry entry)
          Determines, whether a given AuditTrailEntry matches this filter's conditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_BEFORE

protected static int IS_BEFORE

IS_AFTER

protected static int IS_AFTER

IS_EXACTLY

protected static int IS_EXACTLY

timestamp

protected java.util.Date timestamp

mode

protected int mode
Constructor Detail

TimestampFilter

protected TimestampFilter()

TimestampFilter

protected TimestampFilter(java.util.Date aTimestamp,
                          int aMode)
protected constructor - use factory methods!

Parameters:
aTimestamp - timestamp to match
aMode - mode in which to match (before, after, exactly)
Method Detail

before

public static TimestampFilter before(java.util.Date aTimestamp)
Factory method: matches all events before a given date

Parameters:
aTimestamp -
Returns:

after

public static TimestampFilter after(java.util.Date aTimestamp)
Factory method: matches all events after a given date

Parameters:
aTimestamp -
Returns:

exactly

public static TimestampFilter exactly(java.util.Date aTimestamp)
Factory method: matches all events exactly at a given date

Parameters:
aTimestamp -
Returns:

before

public static TimestampFilter before(long aTimeMillis)
Factory method: matches all events before a given date in milliseconds

Parameters:
aTimeMillis -
Returns:

after

public static TimestampFilter after(long aTimeMillis)
Factory method: matches all events after a given date in milliseconds

Parameters:
aTimeMillis -
Returns:

exactly

public static TimestampFilter exactly(long aTimeMillis)
Factory method: matches all events exactly at a given date in milliseconds

Parameters:
aTimeMillis -
Returns:

matches

public boolean matches(AuditTrailEntry entry)
Description copied from interface: EventFilter
Determines, whether a given AuditTrailEntry matches this filter's conditions

Specified by:
matches in interface EventFilter
Returns: