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

lemur::parse::ElemDocMgr Class Reference

#include <ElemDocMgr.hpp>

Inheritance diagram for lemur::parse::ElemDocMgr:

lemur::parse::KeyfileDocMgr lemur::api::DocumentManager lemur::api::TextHandler List of all members.

Public Member Functions

 ElemDocMgr (const string &name, bool readOnly=true)
 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 Member Functions

virtual void writeTOC ()
virtual bool loadTOC ()

Protected Attributes

map< char *, btl, abcelemtable
lemur::file::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

lemur::parse::ElemDocMgr::ElemDocMgr const string &  name,
bool  readOnly = true
 

constructor (for open)

Parameters:
name toc file for this manager (same as getMyID)
readOnly whether or not to open the manager in read only mode.

lemur::parse::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

lemur::parse::ElemDocMgr::~ElemDocMgr  )  [virtual]
 


Member Function Documentation

char * lemur::parse::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 * lemur::parse::ElemDocMgr::handleBeginTag char *  tag,
const char *  orig,
PropertyList props
[virtual]
 

Handle a begin tag token.

Reimplemented from lemur::api::TextHandler.

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

Handle a end tag token.

Reimplemented from lemur::api::TextHandler.

bool lemur::parse::ElemDocMgr::loadTOC  )  [protected, virtual]
 

Reimplemented from lemur::parse::KeyfileDocMgr.

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

Open and load the toc file manname.

Reimplemented from lemur::parse::KeyfileDocMgr.

void lemur::parse::ElemDocMgr::writeTOC  )  [protected, virtual]
 

Reimplemented from lemur::parse::KeyfileDocMgr.


Member Data Documentation

lemur::file::Keyfile lemur::parse::ElemDocMgr::elements [protected]
 

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


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