|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.index.lucene.LuceneIndexManager
public class LuceneIndexManager
An implementation of IndexManager for Lucene indexes.
The GNU Lesser General Public License for details.
Field Summary | |
---|---|
private URI |
baseFolderURI
|
static String |
DIR_LUCENE
The lucene search index directory |
protected static Map<Book,Index> |
INDEXES
The created indexes |
private static org.slf4j.Logger |
log
The log stream |
private IndexPolicy |
policy
|
Constructor Summary | |
---|---|
LuceneIndexManager()
Create a LuceneIndexManager with a default IndexPolicy. |
Method Summary | |
---|---|
void |
closeAllIndexes()
Close all indexes associated with this Index Manager |
void |
deleteIndex(Book book)
Tidy up after yourself and remove all the files that make up any indexes you created. |
Index |
getIndex(Book book)
Create a new Searcher. |
IndexPolicy |
getIndexPolicy()
Obtain the current IndexPolicy. |
protected URI |
getStorageArea(Book book)
Determine where an index should be stored |
void |
installDownloadedIndex(Book book,
URI tempDest)
We have downloaded a search index to a zip file. |
boolean |
isIndexed(Book book)
Detects if index data has been stored and is valid for this Bible. |
boolean |
needsReindexing(Book book)
Clients can use this to determine if book's index is stale and needs to re-indexed or downloaded. |
void |
scheduleIndexCreation(Book book)
Read from the given source version to generate ourselves. |
void |
setIndexPolicy(IndexPolicy policy)
Set the desired IndexPolicy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IndexPolicy policy
private URI baseFolderURI
protected static final Map<Book,Index> INDEXES
public static final String DIR_LUCENE
private static final org.slf4j.Logger log
Constructor Detail |
---|
public LuceneIndexManager()
Method Detail |
---|
public boolean isIndexed(Book book)
IndexManager
isIndexed
in interface IndexManager
book
- the book
public Index getIndex(Book book) throws BookException
IndexManager
getIndex
in interface IndexManager
book
- the book
BookException
public boolean needsReindexing(Book book)
needsReindexing
in interface IndexManager
book
- the Book
IndexManager.needsReindexing(org.crosswire.jsword.book.Book)
public void closeAllIndexes()
IndexManager
closeAllIndexes
in interface IndexManager
public void scheduleIndexCreation(Book book)
IndexManager
scheduleIndexCreation
in interface IndexManager
book
- The book that should be indexedpublic void installDownloadedIndex(Book book, URI tempDest) throws BookException
IndexManager
installDownloadedIndex
in interface IndexManager
book
- The book that we downloaded an index fortempDest
- The URI of a zip file to install
BookException
public void deleteIndex(Book book) throws BookException
IndexManager
deleteIndex
in interface IndexManager
book
- the book who's index should be deleted.
BookException
public IndexPolicy getIndexPolicy()
IndexManager
getIndexPolicy
in interface IndexManager
public void setIndexPolicy(IndexPolicy policy)
IndexManager
setIndexPolicy
in interface IndexManager
policy
- the IndexPolicy to use when creating indexes.protected URI getStorageArea(Book book) throws IOException
book
- The book to be indexed
IOException
- If there is a problem in finding where to store stuff
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |