#include <TextHandler.hpp>
Inheritance diagram for TextHandler:
Public Methods | |
TextHandler () | |
virtual void | foundDoc (char *docno) |
Found a document with document number. | |
virtual void | foundWord (char *word) |
Found a word. | |
virtual void | foundSymbol (char *sym) |
Found a word. | |
virtual void | setTextHandler (TextHandler *th) |
Set the TextHandler that this TextHandler will pass information on to. | |
virtual char * | handleDoc (char *docno) |
Handle a doc. | |
virtual char * | handleWord (char *word) |
Handle a word, possibly transforming it. | |
virtual char * | handleSymbol (char *sym) |
Handle a word, possibly transforming it. | |
Protected Attributes | |
TextHandler * | textHandler |
The next textHandler in the chain. |
A source in the chain of TextHandlers does not need to do anything in the foundDoc and foundWord functions. An example of a source is a parser. A destination in the chain of TextHandlers does not need to forward calls or store a when the setTextHandler function is called. An example of a destination would be a class that pushes the words and documents into an InvFPPushIndex (InvFPTextHandler) or writes to file (WriterTextHandler). Classes in the middle of a chain, like Stopper or Stemmer, need to provide full functionality for all functions. When their foundDoc or foundWord is called, they will possibly manipulate the data, then forward the info via calling the foundDoc/foundWord function of their TextHandler.
|
|
|
Found a document with document number.
|
|
Found a word.
|
|
Found a word.
|
|
Handle a doc.
Reimplemented in DocFreqIndexer, FreqCounter, InvFPTextHandler, FlattextDocMgr, WriterInQueryHandler, and WriterTextHandler. |
|
Handle a word, possibly transforming it.
Reimplemented in WriterInQueryHandler. |
|
Handle a word, possibly transforming it.
Reimplemented in CtfIndexer, DocFreqIndexer, FreqCounter, InvFPTextHandler, QueryTextHandler, Stemmer, Stopper, WriterInQueryHandler, and WriterTextHandler. |
|
Set the TextHandler that this TextHandler will pass information on to.
|
|
The next textHandler in the chain.
|