com.fatdog.xmlEngine.words
Interface IWordHandler

All Known Implementing Classes:
DocItems, FandO, WordManager

public interface IWordHandler

Provides a callback for clients who need a word-break capability.

To use this class, register the object implementing its newWord() callback with a WordBreaker or an object derived from it. When WordBreaker.characters() is invoked, newWord() is called every time a new word is parsed.

You can initialize and pass in an IntList to be populated by newWord() with whatever information is useful to you.

Version:
0.66
Author:
Howard Katz, howardk@fatdog.com
See Also:
WordBreaker

Method Summary
 void newWord(char[] word, int wordStart, int wordEnd, int parent, IntList ints)
          This method will be called whenever WordBreaker.characters(char[], int, int, int, IntList) encounters a new word.
 

Method Detail

newWord

public void newWord(char[] word,
                    int wordStart,
                    int wordEnd,
                    int parent,
                    IntList ints)
This method will be called whenever WordBreaker.characters(char[], int, int, int, IntList) encounters a new word.

Parameters:
word - A char[] array holding the word, possibly larger than the word itself
wordStart - Starting offset of the word in the array
wordEnd - Offset of the first character past the end of the word
parent - Document id index of the node in which the word is found
ints - An optional IntList you can pass indirectly to the routine via WordBreaker.characters()
See Also:
FandO.contains_word(SimpleNode,SimpleNode), IndexManager