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

KeyfileDocMgr Class Reference

#include <KeyfileDocMgr.hpp>

Inheritance diagram for KeyfileDocMgr:

DocumentManager TextHandler ElemDocMgr List of all members.

Public Methods

 KeyfileDocMgr ()
 default constructor

 KeyfileDocMgr (const char *name)
 KeyfileDocMgr (string name, string mode, string source)
virtual ~KeyfileDocMgr ()
char * getDoc (const char *docID)
 return the document associated with this ID

virtual char * handleDoc (char *docno)
 add entry for new doc

virtual void handleEndDoc ()
 finish entry for current doc

virtual char * handleWord (char *word)
 Add start and end byte offsets for this term to the list of offsets.

virtual void setParser (Parser *p)
 set myParser to p

virtual void buildMgr ()
virtual const char * getMyID ()
 return name of this document manager, with the file extension (.bdm).

vector< MatchgetOffsets (char *docID)
virtual bool open (const char *manname)
 Open and load the toc file manname.


Protected Methods

virtual void writeTOC ()
virtual bool loadTOC ()
bool loadFTFiles (const char *fn, int num)

Protected Attributes

vector< Matchoffsets
int numdocs
string pm
Keyfile poslookup
Keyfile doclookup
int dbcache
btl docEntry
char * myDoc
int doclen
string IDname
string IDnameext
vector< string > sources
int fileid

Detailed Description

Document manager using Keyfile for data storage. In addition to providing access to raw document text, also stores byte offsets (start and end byte) for each token within the document. Useful for passage windows or using query term match information for highlighting. Implements TextHandler interface for building the manager.


Constructor & Destructor Documentation

KeyfileDocMgr::KeyfileDocMgr   [inline]
 

default constructor

KeyfileDocMgr::KeyfileDocMgr const char *    name
 

constructor (for open) name = toc file for this manager (same as getMyID)

KeyfileDocMgr::KeyfileDocMgr string    name,
string    mode,
string    source
 

constructor (for build) name = what to name this manager mode = type of parser to use source = file with list of files this will manage

KeyfileDocMgr::~KeyfileDocMgr   [virtual]
 


Member Function Documentation

void KeyfileDocMgr::buildMgr   [virtual]
 

Build the document manager tables from the files previously provided in the constructor.

Implements DocumentManager.

char * KeyfileDocMgr::getDoc const char *    docID [virtual]
 

return the document associated with this ID

Implements DocumentManager.

virtual const char* KeyfileDocMgr::getMyID   [inline, virtual]
 

return name of this document manager, with the file extension (.bdm).

Implements DocumentManager.

vector< Match > KeyfileDocMgr::getOffsets char *    docID
 

get the array of Match entries for the tokens in the document named docID. The entries are indexed by token position (as is recorded in a TermInfoList object.

char * KeyfileDocMgr::handleDoc char *    docno [virtual]
 

add entry for new doc

Reimplemented from TextHandler.

void KeyfileDocMgr::handleEndDoc   [virtual]
 

finish entry for current doc

Reimplemented from TextHandler.

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

Add start and end byte offsets for this term to the list of offsets.

Reimplemented from TextHandler.

bool KeyfileDocMgr::loadFTFiles const char *    fn,
int    num
[protected]
 

bool KeyfileDocMgr::loadTOC   [protected, virtual]
 

Reimplemented in ElemDocMgr.

virtual bool KeyfileDocMgr::open const char *    manname [inline, virtual]
 

Open and load the toc file manname.

Implements DocumentManager.

Reimplemented in ElemDocMgr.

virtual void KeyfileDocMgr::setParser Parser   p [inline, virtual]
 

set myParser to p

void KeyfileDocMgr::writeTOC   [protected, virtual]
 

Reimplemented in ElemDocMgr.


Member Data Documentation

int KeyfileDocMgr::dbcache [protected]
 

btl KeyfileDocMgr::docEntry [protected]
 

int KeyfileDocMgr::doclen [protected]
 

Keyfile KeyfileDocMgr::doclookup [protected]
 

int KeyfileDocMgr::fileid [protected]
 

string KeyfileDocMgr::IDname [protected]
 

string KeyfileDocMgr::IDnameext [protected]
 

char* KeyfileDocMgr::myDoc [protected]
 

int KeyfileDocMgr::numdocs [protected]
 

vector<Match> KeyfileDocMgr::offsets [protected]
 

string KeyfileDocMgr::pm [protected]
 

Keyfile KeyfileDocMgr::poslookup [protected]
 

vector<string> KeyfileDocMgr::sources [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 6 07:12:03 2004 for LEMUR by doxygen1.2.16