eTextReader.AnnotationListing
Class CompoundNotationProvider

java.lang.Object
  extended by 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

Field Summary
private  CombinationMode mode
           
private  NotationProvider provider1
           
private  NotationProvider provider2
           
 
Constructor Summary
CompoundNotationProvider(NotationProvider provider1, NotationProvider provider2, CombinationMode mode)
           
 
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
 

Field Detail

provider1

private NotationProvider provider1

provider2

private NotationProvider provider2

mode

private CombinationMode mode
Constructor Detail

CompoundNotationProvider

public CompoundNotationProvider(NotationProvider provider1,
                                NotationProvider provider2,
                                CombinationMode mode)
Method Detail

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 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