org.archive.wayback.resourceindex
Class CompositeSearchResultSource
java.lang.Object
org.archive.wayback.resourceindex.CompositeSearchResultSource
- All Implemented Interfaces:
- SearchResultSource
- Direct Known Subclasses:
- DynamicCDXIndex
public class CompositeSearchResultSource
- extends Object
- implements SearchResultSource
SearchResultSource that aggregates results from multiple SearchResultSources.
- Version:
- $Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sources
protected List<SearchResultSource> sources
CompositeSearchResultSource
public CompositeSearchResultSource()
- Constructor
addSource
public void addSource(SearchResultSource source)
- add a SearchResultSource to this composite
- Parameters:
source - to be added
getPrefixIterator
public CloseableIterator<CaptureSearchResult> getPrefixIterator(String prefix)
throws ResourceIndexNotAvailableException
- Specified by:
getPrefixIterator in interface SearchResultSource
- Returns:
- CleanableIterator that will return SearchResults beginning with prefix
argument, with subsequent next() calls returning subsequent
results.
- Throws:
ResourceIndexNotAvailableException
getPrefixReverseIterator
public CloseableIterator<CaptureSearchResult> getPrefixReverseIterator(String prefix)
throws ResourceIndexNotAvailableException
- Specified by:
getPrefixReverseIterator in interface SearchResultSource
- Returns:
- CleanableIterator that will return SearchResults starting *before* prefix
argument, with subsequent next() calls returning previous
results.
- Throws:
ResourceIndexNotAvailableException
cleanup
public void cleanup(CloseableIterator<CaptureSearchResult> c)
throws IOException
- Specified by:
cleanup in interface SearchResultSource
- Throws:
IOException
getCDXSources
public List<String> getCDXSources()
- Returns:
- null -- only present for Spring
setCDXSources
public void setCDXSources(List<String> cdxs)
- Sets the list of files searched for queries against this
SearchResultSource to the list of paths cdxs
- Parameters:
cdxs -
setSources
public void setSources(List<SearchResultSource> sources)
- Parameters:
sources - the sources to set
getSources
public List<SearchResultSource> getSources()
- Returns:
- the sources
shutdown
public void shutdown()
throws IOException
- Specified by:
shutdown in interface SearchResultSource
- Throws:
IOException
Copyright © 2005-2011 Internet Archive. All Rights Reserved.