eTextReader.AnnotationListing
Class CompoundNotationProvider
java.lang.Object
eTextReader.AnnotationListing.CompoundNotationProvider
- All Implemented Interfaces:
- NotationProvider
public class CompoundNotationProvider
- extends java.lang.Object
- implements NotationProvider
Combines the set of candidate URLs provided by two NotationProviders to provide a new set. The two sets can
be combined using either the set union or set intersection operators, depending on the CombinationMode value
specified.
More than two NotationProviders can be combined by supplying a CompoundNotationProvider as one (or both) of
the parameters when constructing a CompoundNotationProvider.
- Author:
- mcfall
Method Summary |
java.util.Set<java.lang.String> |
getCandidateURLs(java.lang.String userName)
Determines a list of pages that contain may annotations for the specific user |
java.lang.String |
getDescription()
Returns a description of this provider's scope. |
java.lang.String |
getEndDate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
provider1
private NotationProvider provider1
provider2
private NotationProvider provider2
mode
private CombinationMode mode
CompoundNotationProvider
public CompoundNotationProvider(NotationProvider provider1,
NotationProvider provider2,
CombinationMode mode)
getCandidateURLs
public java.util.Set<java.lang.String> getCandidateURLs(java.lang.String userName)
- Description copied from interface:
NotationProvider
- Determines a list of pages that contain may annotations for the specific user
- Specified by:
getCandidateURLs
in interface NotationProvider
- Parameters:
userName
- the name of the user to check for annotations
- Returns:
- a (possibly empty) set containing String versions of URLs representing
pages that contain annotations viewable by the specified user
getEndDate
public java.lang.String getEndDate()
getDescription
public java.lang.String getDescription()
- Description copied from interface:
NotationProvider
- Returns a description of this provider's scope. Examples include
- all pages
- pages in the current book
Since this will usually be at the end of a phrase, the description
should start with a lower case letter
- Specified by:
getDescription
in interface NotationProvider
- Returns:
- a string describing the provider's scope