Constructor and Description |
---|
ARCLookup(ViewerArcRepositoryClient arcRepositoryClient)
Create a new ARCLookup object.
|
Modifier and Type | Method and Description |
---|---|
ResultStream |
lookup(URI uri)
Look up a given URI and return the contents as an InputStream.
|
void |
setIndex(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)
The setter for the option to search for URIs with ftp instead of http as the scheme.
|
public ARCLookup(ViewerArcRepositoryClient arcRepositoryClient)
arcRepositoryClient
- The interface to the ArcRepositoryArgumentNotValid
- if arcRepositoryClient is null.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(File indexDir)
indexDir
- The new index, a directory containing Lucene files.ArgumentNotValid
- If argument is nullpublic ResultStream lookup(URI uri)
If the tryToLookupUriAsFtp field is set to true, we will try exchanging the schema with ftp, whenever we can't lookup the uri with the original schema.
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.Copyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.