|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.distribute.arcrepository.ARCLookup
public class ARCLookup
This class allows lookup of URLs in the ArcRepository, using full Lucene indexes to find offsets. The input takes the form of a directory containing a Lucene index.
Constructor Summary | |
---|---|
ARCLookup(ViewerArcRepositoryClient arcRepositoryClient)
Create a new ARCLookup object. |
Method Summary | |
---|---|
ResultStream |
lookup(java.net.URI uri)
Look up a given URI and return the contents as an InputStream. |
void |
setIndex(java.io.File indexDir)
This method sets the current Lucene index this object works on, replacing and closing the current index if one is already set. |
void |
setTryToLookupUriAsFtp(boolean searchForFtpUri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ARCLookup(ViewerArcRepositoryClient arcRepositoryClient)
arcRepositoryClient
- The interface to the ArcRepository
ArgumentNotValid
- if arcRepositoryClient is null.Method Detail |
---|
public void setTryToLookupUriAsFtp(boolean searchForFtpUri)
searchForFtpUri
- if true, we replace the http schema with ftp and
try again, if unsuccessful with http as the schemapublic void setIndex(java.io.File indexDir)
indexDir
- The new index, a directory containing Lucene files.
ArgumentNotValid
- If argument is nullpublic ResultStream lookup(java.net.URI uri)
uri
- The URI to find in the archive. If the URI does not
match any entries in the archive, null is returned.
IOFailure
- If the ARC file was found in the Lucene index but not
in the bit archive, or if some other failure happened while finding
the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |