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

lemur::api::QueryDocument Class Reference

A convenience class for dealing with "interactive" queries. More...

#include <QueryDocument.hpp>

Inheritance diagram for lemur::api::QueryDocument:

lemur::api::Document lemur::api::TextHandler List of all members.

Public Member Functions

 QueryDocument ()
 ~QueryDocument ()
void startTermIteration () const
 start term iteration

bool hasMore () const
 returns true iff there's at least one term for iteration

void skipToEnd () const
 "fast forward" to the end of the document

const TermnextTerm () const
 get the next term. do not delete TT returned

void addTerm (const char *token)
char * handleWord (char *word)
 Handle a word, possibly transforming it.

char * handleSymbol (char *sym)
 Handle a word, possibly transforming it.

const char * getID () const
 returns the external string ID

void setID (const char *idstr)

Private Attributes

char * id
vector< char * > tokens
int iter
Term tt

Detailed Description

A convenience class for dealing with "interactive" queries.

Creates a Document object compatible with TextQuery and StructQuery. Also a TH so it can be chained at the end of stoppers, stemmers, InqueryOpParser, (etc.) for query processing.


Constructor & Destructor Documentation

lemur::api::QueryDocument::QueryDocument  ) 
 

lemur::api::QueryDocument::~QueryDocument  ) 
 


Member Function Documentation

void lemur::api::QueryDocument::addTerm const char *  token  ) 
 

const char* lemur::api::QueryDocument::getID  )  const [inline, virtual]
 

returns the external string ID

Implements lemur::api::Document.

char * lemur::api::QueryDocument::handleSymbol char *  sym  )  [virtual]
 

Handle a word, possibly transforming it.

Reimplemented from lemur::api::TextHandler.

char * lemur::api::QueryDocument::handleWord char *  word  )  [virtual]
 

Handle a word, possibly transforming it.

Reimplemented from lemur::api::TextHandler.

bool lemur::api::QueryDocument::hasMore  )  const [inline, virtual]
 

returns true iff there's at least one term for iteration

Implements lemur::api::Document.

const lemur::api::Term * lemur::api::QueryDocument::nextTerm  )  const [virtual]
 

get the next term. do not delete TT returned

Implements lemur::api::Document.

void lemur::api::QueryDocument::setID const char *  idstr  )  [inline]
 

void lemur::api::QueryDocument::skipToEnd  )  const [inline, virtual]
 

"fast forward" to the end of the document

Implements lemur::api::Document.

void lemur::api::QueryDocument::startTermIteration  )  const [inline, virtual]
 

start term iteration

Implements lemur::api::Document.


Member Data Documentation

char* lemur::api::QueryDocument::id [private]
 

int lemur::api::QueryDocument::iter [mutable, private]
 

vector<char*> lemur::api::QueryDocument::tokens [private]
 

Term lemur::api::QueryDocument::tt [mutable, private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4