Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TextHandler Class Reference

#include <TextHandler.hpp>

Inheritance diagram for TextHandler:

CtfIndexer DocFreqIndexer FlattextDocMgr FreqCounter InvFPTextHandler MemParser Parser QueryTextHandler Stemmer Stopper WriterInQueryHandler WriterTextHandler List of all members.

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.


Detailed Description

This class serves as an interface for classes working with the parsers. The setTextHandler function allows chaining of TextHandlers, so that information is passed from one TextHandler to the next. This is useful for chaining things like stopword lists and stemmers.

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.


Constructor & Destructor Documentation

TextHandler::TextHandler   [inline]
 


Member Function Documentation

virtual void TextHandler::foundDoc char *    docno [inline, virtual]
 

Found a document with document number.

virtual void TextHandler::foundSymbol char *    sym [inline, virtual]
 

Found a word.

virtual void TextHandler::foundWord char *    word [inline, virtual]
 

Found a word.

virtual char* TextHandler::handleDoc char *    docno [inline, virtual]
 

Handle a doc.

Reimplemented in DocFreqIndexer, FreqCounter, InvFPTextHandler, FlattextDocMgr, WriterInQueryHandler, and WriterTextHandler.

virtual char* TextHandler::handleSymbol char *    sym [inline, virtual]
 

Handle a word, possibly transforming it.

Reimplemented in WriterInQueryHandler.

virtual char* TextHandler::handleWord char *    word [inline, virtual]
 

Handle a word, possibly transforming it.

Reimplemented in CtfIndexer, DocFreqIndexer, FreqCounter, InvFPTextHandler, QueryTextHandler, Stemmer, Stopper, WriterInQueryHandler, and WriterTextHandler.

virtual void TextHandler::setTextHandler TextHandler *    th [inline, virtual]
 

Set the TextHandler that this TextHandler will pass information on to.


Member Data Documentation

TextHandler* TextHandler::textHandler [protected]
 

The next textHandler in the chain.


The documentation for this class was generated from the following file:
Generated on Mon Sep 30 14:14:24 2002 for LEMUR by doxygen1.2.18