|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmaiolum.xml.search.BibleModuleIndexer
Used to perform bible documents reindexing using Lucene. This class should be used to start reindexing single document (represented in the filesystem or by DOM) or all BibleModules located in ModuleManager.
| Constructor Summary | |
BibleModuleIndexer()
Default constructor. |
|
BibleModuleIndexer(java.lang.String baseIndexPath)
Instantiates new BibleModuleIndexer using parameter for base location of index. |
|
| Method Summary | |
java.lang.String |
getBaseIndexPath()
Sets base directory, where the index will be located |
Edition |
getDefaultEdition()
Get default Edition for the parsed XML bible document |
void |
mergeIndices(java.io.File indicesParentDir,
java.io.File mainIndexDir)
Merges all indices located in the subdirectories into one larger. |
void |
reindex(org.xml.sax.InputSource source,
java.io.File indexDirectory)
Reindexes bible document in the DOM InputSource representation to given directory. |
void |
reindex(PXBibleModule module)
Reindexes given XML BibleModule to base index directory. |
void |
reindex(PXDataSource ds)
Reindexes all BibleModules in the ModuleManager to base index directory. |
void |
reindex(java.lang.String systemID,
java.io.File indexDirectory)
Reindexes bible document identified by system ID to given directory. |
void |
retrieveVerse(org.apache.lucene.document.Document doc)
Observer of the BibleContentHandler. |
void |
setBaseIndexPath(java.lang.String value)
Returns base directory, where index is located |
void |
setDefaultEdition(Edition defaultEdition)
Set default Edition for the parsed XML bible document |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BibleModuleIndexer()
public BibleModuleIndexer(java.lang.String baseIndexPath)
| Method Detail |
public void reindex(java.lang.String systemID,
java.io.File indexDirectory)
throws java.io.IOException,
ParseException
systemID - specifies location (typically in the filesystem) of
document to be indexed.indexDirectory - fully qualified path to the directory, where will be the index
created
java.io.IOException - when I/O problem is encountered while creating index
ParseException - when source document cannot be properly parsed
public void reindex(org.xml.sax.InputSource source,
java.io.File indexDirectory)
throws java.io.IOException,
ParseException
source - represents document DOM representationindexDirectory - fully qualified path to the directory, where will be the index
created
java.io.IOException - when I/O problem is encountered while creating index
ParseException - when source document cannot be properly parsed
public void reindex(PXDataSource ds)
throws java.io.IOException,
ParseException
setBaseIndexPath(String) to set the target directory for index.
Each module in the ModuleManager will be indexed into separate index,
while this indexes are located in the subdirectories of the base
index directory. Names of these subdirectories are set according
to hash value of BibleModule URI (using Object.hashCode()).
You can merge multiple indices into one larger using
mergeIndices(File, File) method.
java.io.IOException
ParseException
public void reindex(PXBibleModule module)
throws java.io.IOException,
ParseException
setBaseIndexPath(String) to set the target directory for index.
The module will be indexed subdirectory of base directory, the
name is set according to hash value of BibleModule URI
(using Object.hashCode()).
You can merge multiple indices into one larger using
mergeIndices(File, File) method.
java.io.IOException
ParseException
public void mergeIndices(java.io.File indicesParentDir,
java.io.File mainIndexDir)
throws java.io.IOException
indicesParentDir - is the directory, which contains multiple
subdirectories -- each of these subdirectories should hold one
index.mainIndexDir - represents target directory into which will the partial
indices be merged.
java.io.IOExceptionpublic void retrieveVerse(org.apache.lucene.document.Document doc)
retrieveVerse in interface VerseDocumentObserverpublic java.lang.String getBaseIndexPath()
public void setBaseIndexPath(java.lang.String value)
public Edition getDefaultEdition()
public void setDefaultEdition(Edition defaultEdition)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||