public class RemoteResourceIndex extends Object implements ResourceIndex
Constructor and Description |
---|
RemoteResourceIndex() |
public void init() throws ConfigurationException
ConfigurationException
public SearchResults query(WaybackRequest wbRequest) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException
ResourceIndex
query
in interface ResourceIndex
wbRequest
- WaybackRequest object from RequestParserResourceIndexNotAvailableException
- if the ResourceIndex
is not available (remote host down, local files missing, etc)ResourceNotInArchiveException
- if the ResourceIndex could be
contacted, but no SearchResult objects matched the requestBadQueryException
- if the WaybackRequest is lacking information
required to make a reasonable search of this ResourceIndexAccessControlException
- if SearchResult objects actually matched,
but could not be returned due to AccessControl restrictions
(robots.txt documents, Administrative URL blocks, etc)protected SearchResults urlToSearchResults(String requestUrl, ObjectFilter<CaptureSearchResult> filter) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException
protected void checkDocumentForExceptions(Document document) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException
protected ObjectFilter<CaptureSearchResult> getSearchResultFilters(WaybackRequest wbRequest)
protected SearchResults documentToSearchResults(Document document, ObjectFilter<CaptureSearchResult> filter) throws ResourceNotInArchiveException
ResourceNotInArchiveException
protected String getRequestUrl(WaybackRequest wbRequest) throws BadQueryException
BadQueryException
protected Document getHttpDocument(String url) throws IOException, SAXException
IOException
SAXException
protected Document getFileDocument(File f) throws IOException, SAXException
IOException
SAXException
public String getSearchUrlBase()
public void setSearchUrlBase(String searchUrlBase)
searchUrlBase
- the searchUrlBase to setpublic void shutdown() throws IOException
ResourceIndex
shutdown
in interface ResourceIndex
IOException
- for usual causespublic UrlCanonicalizer getCanonicalizer()
public void setCanonicalizer(UrlCanonicalizer canonicalizer)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getReadTimeout()
public void setReadTimeout(int readTimeout)
Copyright © 2005–2015 IIPC. All rights reserved.