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

ElemDocMgr Class Reference

#include <ElemDocMgr.hpp>

Inheritance diagram for ElemDocMgr:

KeyfileDocMgr DocumentManager TextHandler List of all members.

Public Methods

 ElemDocMgr (const string &name)
 ElemDocMgr (string name, string mode, string source)
virtual ~ElemDocMgr ()
virtual char * handleBeginTag (char *tag, const char *orig, PropertyList *props)
 Handle a begin tag token.

virtual char * handleEndTag (char *tag, const char *orig, PropertyList *props)
 Handle a end tag token.

virtual char * getElement (const char *docid, const char *element) const
virtual bool open (const string &manname)
 Open and load the toc file manname.


Protected Methods

virtual void writeTOC ()
virtual bool loadTOC ()

Protected Attributes

map< char *, btl, abcelemtable
Keyfile elements

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. Extended from KeyfileDocMgr to include another DB for storing elements of the document, ie titles. Elements can handle nested tags, but can have only one of each type of element for each document. If more than one of the same type of element, the last one is the one actually saved. If more than one of the same type element tags are nested, the inner tags are ignored.


Constructor & Destructor Documentation

ElemDocMgr::ElemDocMgr const string &    name
 

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

ElemDocMgr::ElemDocMgr 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

ElemDocMgr::~ElemDocMgr   [virtual]
 


Member Function Documentation

char * ElemDocMgr::getElement const char *    docid,
const char *    element
const [virtual]
 

Get an element of a document with "element" name caller deletes memory with delete[] returns NULL if no such element exists for document

char * ElemDocMgr::handleBeginTag char *    tag,
const char *    orig,
PropertyList   props
[virtual]
 

Handle a begin tag token.

Reimplemented from TextHandler.

char * ElemDocMgr::handleEndTag char *    tag,
const char *    orig,
PropertyList   props
[virtual]
 

Handle a end tag token.

Reimplemented from TextHandler.

bool ElemDocMgr::loadTOC   [protected, virtual]
 

Reimplemented from KeyfileDocMgr.

virtual bool ElemDocMgr::open const string &    manname [inline, virtual]
 

Open and load the toc file manname.

Reimplemented from KeyfileDocMgr.

void ElemDocMgr::writeTOC   [protected, virtual]
 

Reimplemented from KeyfileDocMgr.


Member Data Documentation

Keyfile ElemDocMgr::elements [protected]
 

map<char*,btl,abc> ElemDocMgr::elemtable [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:31 2004 for Lemur Toolkit by doxygen1.2.18