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