javax.help.search
Class IndexBuilder
java.lang.Object
javax.help.search.IndexBuilder
public abstract class IndexBuilder
extends java.lang.Object
Abstract base class that builds an index for a search database.
abstract void | close() - Closes the index.
|
abstract void | closeDocument() - Closes the document.
|
abstract Enumeration | getStopWords() - Returns the list of stopwords for an index.
|
abstract void | openDocument(String name) - Opens a document to store information.
|
abstract void | storeLocation(String text, int position) - Stores a concept at a given position.
|
abstract void | storeStopWords(Enumeration stopWords) - Sets the stopwords in an index.
|
abstract void | storeTitle(String title) - Stores the title for the document.
|
indexDir
protected String indexDir
IndexBuilder
public IndexBuilder(String indexDir)
throws Exception
Builds an index at indexDir. If indexDir already exists
the index is opened and the new doucments are merged into
the existing document.
close
public abstract void close()
throws Exception
Closes the index.
closeDocument
public abstract void closeDocument()
throws Exception
Closes the document. This prevents any additional information from being
stored.
getStopWords
public abstract Enumeration getStopWords()
Returns the list of stopwords for an index.
openDocument
public abstract void openDocument(String name)
throws Exception
Opens a document to store information.
storeLocation
public abstract void storeLocation(String text,
int position)
throws Exception
Stores a concept at a given position.
storeStopWords
public abstract void storeStopWords(Enumeration stopWords)
Sets the stopwords in an index. If the stopwords are already
defined for an index, the stop words are merged with the existing
set of stopwords.
storeTitle
public abstract void storeTitle(String title)
throws Exception
Stores the title for the document.