Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.index.lucene
Class LuceneIndexManager

    java.lang.Object
      org.crosswire.jsword.index.lucene.LuceneIndexManager

All Implemented Interfaces:
  IndexManager

    public class LuceneIndexManager

extends Object
implements IndexManager

An implementation of IndexManager for Lucene indexes.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`private static String` | `DIR_LUCENE` The lucene search index directory
`protected static Map` | `INDEXES` The created indexes
`private static Logger` | `log` The log stream

Constructor Summary
`LuceneIndexManager()`

Method Summary
`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.
`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 for this Bible already
`void` | `scheduleIndexCreation(Book book)` Read from the given source version to generate ourselves.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INDEXES

    protected static final Map INDEXES

  The created indexes

### DIR_LUCENE

    private static final String DIR_LUCENE

  The lucene search index directory

  See Also:
    Constant Field Values

### log

    private static final Logger log

  The log stream

Constructor Detail

### LuceneIndexManager

    public LuceneIndexManager()

Method Detail

### isIndexed

    public boolean isIndexed(Book book)

  Description copied from interface: `IndexManager`
  Detects if index data has been stored for this Bible already

  Specified by:
    `isIndexed` in interface `IndexManager`

### getIndex

    public Index getIndex(Book book)
                   throws BookException

  Description copied from interface: `IndexManager`
  Create a new Searcher.

  Specified by:
    `getIndex` in interface `IndexManager`
  Throws:
    `BookException`

### scheduleIndexCreation

    public void scheduleIndexCreation(Book book)

  Description copied from interface: `IndexManager`
  Read from the given source version to generate ourselves. On completion of this method the index should be usable.

  Specified by:
    `scheduleIndexCreation` in interface `IndexManager`

### installDownloadedIndex

    public void installDownloadedIndex(Book book,
                                       URI tempDest)
                                throws BookException

  Description copied from interface: `IndexManager`
  We have downloaded a search index to a zip file. It should be installed from here.

  Specified by:
    `installDownloadedIndex` in interface `IndexManager`
  Parameters:
    `book` - The book that we downloaded an index for
    `tempDest` - The URI of a zip file to install
  Throws:
    `BookException`

### deleteIndex

    public void deleteIndex(Book book)
                     throws BookException

  Description copied from interface: `IndexManager`
  Tidy up after yourself and remove all the files that make up any indexes you created.

  Specified by:
    `deleteIndex` in interface `IndexManager`
  Throws:
    `BookException`

### getStorageArea

    protected URI getStorageArea(Book book)
                          throws IOException

  Determine where an index should be stored

  Parameters:
    `book` - The book to be indexed
  Returns:
    A URI to store stuff in
  Throws:
    `IOException` - If there is a problem in finding where to store stuff

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD