public class RemoteResourceIndex extends Object implements ResourceIndex
| Constructor and Description |
|---|
RemoteResourceIndex() |
public void init()
throws ConfigurationException
ConfigurationExceptionpublic SearchResults query(WaybackRequest wbRequest) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException
ResourceIndexquery in interface ResourceIndexwbRequest - 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
ResourceNotInArchiveExceptionprotected String getRequestUrl(WaybackRequest wbRequest) throws BadQueryException
BadQueryExceptionprotected Document getHttpDocument(String url) throws IOException, SAXException
IOExceptionSAXExceptionprotected Document getFileDocument(File f) throws IOException, SAXException
IOExceptionSAXExceptionpublic String getSearchUrlBase()
public void setSearchUrlBase(String searchUrlBase)
searchUrlBase - the searchUrlBase to setpublic void shutdown()
throws IOException
ResourceIndexshutdown in interface ResourceIndexIOException - 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.