Public Member Functions

GlobalParserDatabase Class Reference
[Code for the parsing/indexing task]

Database for global (thread-safe) parser use. More...

#include <globalparserdatabase.hpp>

Inheritance diagram for GlobalParserDatabase:
Database

List of all members.

Public Member Functions

 GlobalParserDatabase ()
int attributeNameId (const QString &attributeName)
 Returns the attribute name id.
void cancelFile (int idFile, bool toError)
 Update the file status to 'waiting'.
int generateDocumentId () const
 Returns an available document id.
DocumentList getDocuments (int count) const
 Gets count documents with the Waiting status.
void refreshAttributeNames ()
 Refresh the buffer map of the attribute names.
void refreshTagNames ()
 Refresh the buffer map of the tag names.
int tagNameId (const QString &tagName)
 Returns the tag name id.

Detailed Description

Database for global (thread-safe) parser use.


Constructor & Destructor Documentation

GlobalParserDatabase::GlobalParserDatabase (  ) 

Member Function Documentation

int GlobalParserDatabase::attributeNameId ( const QString &  attributeName  ) 

Returns the attribute name id.

Thread-safe. It will add the attribute name if unknown and then cache again the buffer map.

Exceptions:
DatabaseException If a connection error occurs
void GlobalParserDatabase::cancelFile ( int  idFile,
bool  toError 
)

Update the file status to 'waiting'.

Thread-safe.

Exceptions:
DatabaseException If a connection error occurs
int GlobalParserDatabase::generateDocumentId (  )  const

Returns an available document id.

Thread-safe.

Exceptions:
DatabaseException If a connection error occurs
DocumentList GlobalParserDatabase::getDocuments ( int  count  )  const

Gets count documents with the Waiting status.

Warning:
Not thread-safe !
Parameters:
count The max count of documents to get, set to -1 for no limit
Exceptions:
DatabaseException If a connection error occurs
void GlobalParserDatabase::refreshAttributeNames (  ) 

Refresh the buffer map of the attribute names.

Warning:
Not thread-safe !
Exceptions:
DatabaseException If a connection error occurs
void GlobalParserDatabase::refreshTagNames (  ) 

Refresh the buffer map of the tag names.

Warning:
Not thread-safe !
Exceptions:
DatabaseException If a connection error occurs
int GlobalParserDatabase::tagNameId ( const QString &  tagName  ) 

Returns the tag name id.

Thread-safe. It will add the tag name if unknown and then cache again the buffer map.

Exceptions:
DatabaseException If a connection error occurs
All Classes Functions Variables Typedefs Enumerations Enumerator