|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.ceryle.util.search.Indexer
org.ceryle.xnode.search.XNodeIndexer
public class XNodeIndexer
Extends Indexer (which extends Thread) to build an index for the XNode-based database.
This supports incremental indexing of a single document if one or more documents are
set via setXNodeID(XNodeID), otherwise this will index the entire XNodeStore.
Note that this class is not reentrant.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class org.ceryle.util.search.Indexer |
|---|
ANALYZER_SIMPLE, ANALYZER_STANDARD, ANALYZER_TYPE, create, m_analyzer, m_indexDirectory, m_writer, mh, mw, progress, SEARCH_INDEX_PATH, srvs, THREAD_PRIORITY |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
XNodeIndexer(MessageWriter msgwriter,
ProgressBar progressbar,
boolean closeOnComplete)
Constructor with a MessageWriter and ProgressBar. |
|
XNodeIndexer(MessageWriter msgwriter,
ProgressBar progressbar,
XNodeID xid,
boolean closeOnComplete)
Constructor with a MessageWriter, ProgressBar, and a single document, as represented by the XNodeID. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancel any running indexing operation. |
File |
getIndexDirectory()
Lazily creates or returns the existing index directory, whose path is set from a property. |
protected static boolean |
isAcceptableFormat(XNode xnode)
Checks the document format of the provided XNode (via its DC.Format property) to see if it is readable by the search engine, returning true if acceptable. |
boolean |
restoreIndex()
Restore the existing index after opening a new session, returning true if successful. |
void |
run()
Despite this being an extension of Thread, this method should not be called directly - instead, use Indexer.index(boolean). |
void |
setXNodeID(XNodeID xid)
Set the document to be indexed via its XNodeID. |
| Methods inherited from class org.ceryle.util.search.Indexer |
|---|
closeIndex, deleteIndex, getAnalyzer, getIndexReader, getIndexWriter, getMessageHandler, getMessageWriter, getProgressBar, getStopWords, getVersion, hasProgressBar, index, isCreateIndex, isIndexed, mergeIndex, setCreateIndex, setIndexDirectory, setIsIndexed, setProgressBar |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XNodeIndexer(MessageWriter msgwriter,
ProgressBar progressbar,
boolean closeOnComplete)
throws SearchException
setXNodeID(XNodeID) is not called to set individual
documents, this will cause the entire XNodeStore to be indexed.
The closeOnComplete flag is false, the index will
remain open following an index operation to allow merging.
SearchException
public XNodeIndexer(MessageWriter msgwriter,
ProgressBar progressbar,
XNodeID xid,
boolean closeOnComplete)
throws SearchException
setXNodeID(XNodeID).
The closeOnComplete flag is false, the index will
remain open following an index operation to allow merging.
SearchException| Method Detail |
|---|
public void cancel()
public void setXNodeID(XNodeID xid)
public void run()
Indexer.index(boolean).
run in interface Runnablerun in class Indexerprotected static boolean isAcceptableFormat(XNode xnode)
public boolean restoreIndex()
restoreIndex in class Indexer
public File getIndexDirectory()
throws IOException
getIndexDirectory in class IndexerIOException - if for any reason the directory is not made available.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||