Package javax.help.search

# Class IndexBuilder

java.lang.Object
javax.help.search.IndexBuilder

public abstract class IndexBuilder extends Object
Abstract base class that builds an index for a search database.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`indexDir`

## Constructor Summary

Constructors
Constructor
Description
`IndexBuilder(String indexDir)`
Builds an index at indexDir.

## Method Summary

Modifier and Type
Method
Description
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### indexDir

protected String indexDir

## Constructor Details

### 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.

Throws:
  `Exception`

## Method Details

### close

public abstract void close() throws Exception
Closes the index.

Throws:
  `Exception`

### 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.

### 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.

Throws:
  `Exception`

### closeDocument

public abstract void closeDocument() throws Exception
Closes the document. This prevents any additional information from being stored.

Throws:
  `Exception`

### storeLocation

public abstract void storeLocation(String text, int position) throws Exception
Stores a concept at a given position.

Throws:
  `Exception`

### storeTitle

public abstract void storeTitle(String title) throws Exception
Stores the title for the document.

Throws:
  `Exception`