eTextReader.AnnotationListing
Interface NotationFilter

All Known Implementing Classes:
AnnotationTypeFilter, CompoundFilter, DateRangeFilter, FieldFilter, IncludeAllFilter, RangeFilter

public interface NotationFilter

NotationFilter provides an interface that the NotationListing class uses to determine which annotations should be included in an annotation listing. The primary method of interest is include, which returns true or false depending on whether or not the filter should include a specified notation.

Due to the extra database efficiency associated with retrieving annotations within a date range, a filter may specify a starting date and ending date; code wanting to know whether or not these dates are meaningful can call the isDateFilter method, which should return false if the filter does not include a date range

Author:
mcfall

Method Summary
 java.lang.String getDescription()
          Retrieves a description of this filter, used to display information about this filter in a menu item, button, etc.
 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 include(Notation n)
          Determines whether the notation n matches the criteria for inclusion provided by this filter
 boolean isDateFilter()
          Determines whether this filter includes a date component; used to restrict the annotations returned by requestViewableAnnotations
 

Method Detail

include

boolean include(Notation n)
Determines whether the notation n matches the criteria for inclusion provided by this filter

Parameters:
n - the notation to filter
Returns:

isDateFilter

boolean isDateFilter()
Determines whether this filter includes a date component; used to restrict the annotations returned by requestViewableAnnotations

Returns:
true if this filter includes a date range component, false otherwise

getStartDate

java.lang.String getStartDate()
Retrieves the starting date for notations that match this filter. If

getEndDate

java.lang.String getEndDate()
Retrieves the ending date for notations that match this filter. If isDateFilter returns false, this method must return null

Returns:
the ending date associated with the filter, or null if not applicable

getDescription

java.lang.String getDescription()
Retrieves a description of this filter, used to display information about this filter in a menu item, button, etc. Examples would be
  • All annotations
  • My annotations
  • Annotations on this page
etc.

Returns:
a String description of this filter