eTextReader.AnnotationListing
Class DateRangeFilter
java.lang.Object
eTextReader.AnnotationListing.IncludeAllFilter
eTextReader.AnnotationListing.DateRangeFilter
- All Implemented Interfaces:
- NotationFilter
public class DateRangeFilter
- extends IncludeAllFilter
Implements a simple date range check. Since the NotationListing class will access this class' getStartDate and getEndDate
methods, we need only set those fields appropriately; the include method is inherited from IncludeAllFilter
- Author:
- mcfall
Field Summary |
private java.lang.String |
endDate
|
private java.lang.String |
startDate
|
Constructor Summary |
DateRangeFilter(java.lang.String startDate,
java.lang.String endDate)
Constructs a DateRangeFilter that will include annotations created
between (inclusive) of startDate and endDate. |
Method Summary |
java.lang.String |
getEndDate()
Retrieves the ending date for notations that match this filter. |
java.lang.String |
getStartDate()
Retrieves the starting date for notations that match this filter. |
boolean |
isDateFilter()
Determines whether this filter includes a date component; used to restrict the annotations returned
by requestViewableAnnotations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
startDate
private java.lang.String startDate
endDate
private java.lang.String endDate
DateRangeFilter
public DateRangeFilter(java.lang.String startDate,
java.lang.String endDate)
- Constructs a DateRangeFilter that will include annotations created
between (inclusive) of startDate and endDate.
- Parameters:
startDate
- endDate
-
getEndDate
public java.lang.String getEndDate()
- Description copied from interface:
NotationFilter
- Retrieves the ending date for notations that match this filter. If isDateFilter returns false,
this method must return null
- Specified by:
getEndDate
in interface NotationFilter
- Overrides:
getEndDate
in class IncludeAllFilter
- Returns:
- the ending date associated with the filter, or null if not applicable
getStartDate
public java.lang.String getStartDate()
- Description copied from interface:
NotationFilter
- Retrieves the starting date for notations that match this filter. If getStartDate in interface
NotationFilter
- Overrides:
getStartDate
in class IncludeAllFilter
- Returns:
- the starting date associated with the filter, or null if not applicable
isDateFilter
public boolean isDateFilter()
- Description copied from interface:
NotationFilter
- Determines whether this filter includes a date component; used to restrict the annotations returned
by requestViewableAnnotations
- Specified by:
isDateFilter
in interface NotationFilter
- Overrides:
isDateFilter
in class IncludeAllFilter
- Returns:
- true if this filter includes a date range component, false otherwise