Using the XmlDataManager one can manage documents and collections. More...
#include <zorba/xmldatamanager.h>
Classes | |
class | ParseOptions |
The ParseOptions class stores various properties that affect how a document is parsed. More... | |
Public Member Functions | |
virtual Item | fetch (const String &aURI) const =0 |
Fetches an resource refered to by the given URI. | |
virtual CollectionManager * | getCollectionManager () const =0 |
Returns a CollectionManager responsible for all collections. | |
virtual DocumentManager * | getDocumentManager () const =0 |
virtual CollectionManager * | getW3CCollectionManager () const =0 |
Returns a CollectionManager responsible for collections identified by a URI. | |
virtual Item | parseXML (std::istream &aStream) const =0 |
Parse an XML document and return an Item. | |
virtual ItemSequence_t | parseXML (std::istream &aStream, const String &aBaseURI, ParseOptions &aOptions) const =0 |
Parse an XML document and return a sequence of nodes. | |
virtual Item | parseXML (std::istream &aStream, const String &aBaseURI) const =0 |
Parse an XML document and return an Item. | |
virtual ItemSequence_t | parseXML (std::istream &aStream, ParseOptions &aOptions) const =0 |
Parse an XML document and return a sequence of nodes. | |
virtual void | registerDiagnosticHandler (DiagnosticHandler *aDiagnosticHandler)=0 |
Register a DiagnosticHandler to which errors occuring during the management of documents and collections are reported. | |
virtual void | registerStemmerProvider (StemmerProvider const *provider)=0 |
Registers a StemmerProvider to use for stemming of text content in order to perform queries involving full-text. | |
virtual void | registerTokenizerProvider (TokenizerProvider const *provider)=0 |
Registers a TokenizerProvider to use for toknenization of text content in order to perform queries involving full-text. | |
Protected Member Functions | |
virtual | ~XmlDataManager () |
Destructor. |
Using the XmlDataManager one can manage documents and collections.
The XmlDataManager is a singleton instance. The Zorba object is reponsible for maintaining its lifetime. The instance can be accessed by calling getXmlDataManager() on the Zorba object. It may not be accessed anymore after Zorba::shutdown() has been called.
XmlDataManager is a thread-safe class.
context.cpp, and datamanager.cpp.
Definition at line 35 of file xmldatamanager.h.
virtual zorba::XmlDataManager::~XmlDataManager | ( | ) | [inline, protected, virtual] |
Destructor.
Definition at line 239 of file xmldatamanager.h.
Fetches an resource refered to by the given URI.
virtual CollectionManager* zorba::XmlDataManager::getCollectionManager | ( | ) | const [pure virtual] |
Returns a CollectionManager responsible for all collections.
The collection manager provides a set of functions for managing collections identified by a QName and their contents.
Please note that the resulting manager is only responsible for dynamic collections identified by a QName, i.e. those that are not declared in the prolog of a module or identified by a URI.
virtual DocumentManager* zorba::XmlDataManager::getDocumentManager | ( | ) | const [pure virtual] |
virtual CollectionManager* zorba::XmlDataManager::getW3CCollectionManager | ( | ) | const [pure virtual] |
Returns a CollectionManager responsible for collections identified by a URI.
The collection manager provides a set of functions for managing collections identified by a URI and their contents.
Please note that the resulting manager is only responsible for dynamic collections identified by a URI, i.e. those that are not declared in the prolog of a module or identified by a QName.
virtual Item zorba::XmlDataManager::parseXML | ( | std::istream & | aStream | ) | const [pure virtual] |
Parse an XML document and return an Item.
virtual ItemSequence_t zorba::XmlDataManager::parseXML | ( | std::istream & | aStream, |
const String & | aBaseURI, | ||
ParseOptions & | aOptions | ||
) | const [pure virtual] |
Parse an XML document and return a sequence of nodes.
This function parses the given input stream and returns the result as a sequence of nodes. If external entity processing is disabled the result will be a singleton sequence consisting of one document node. Otherwise, the result is the sequence of the external entity nodes.
aStream | the input stream whose content should be parsed |
aBaseURI | the base URI which will be used as the base URI of the document. This serves both as the base URI used by the XML parser to resolve relative entity references within the document, and as the base URI of the document node that is returned. |
aOptions |
virtual Item zorba::XmlDataManager::parseXML | ( | std::istream & | aStream, |
const String & | aBaseURI | ||
) | const [pure virtual] |
Parse an XML document and return an Item.
aStream | the input stream whose content should be parsed |
aBaseURI | the base URI which will be used as the base URI of the document. This serves both as the base URI used by the XML parser to resolve relative entity references within the document, and as the base URI of the document node that is returned. |
virtual ItemSequence_t zorba::XmlDataManager::parseXML | ( | std::istream & | aStream, |
ParseOptions & | aOptions | ||
) | const [pure virtual] |
Parse an XML document and return a sequence of nodes.
This function parses the given input stream and returns the result as a sequence of nodes. If external entity processing is disabled the result will be a singleton sequence consisting of one document node. Otherwise, the result is the sequence of the external entity nodes.
aStream | the input stream whose content should be parsed |
aOptions |
virtual void zorba::XmlDataManager::registerDiagnosticHandler | ( | DiagnosticHandler * | aDiagnosticHandler | ) | [pure virtual] |
Register a DiagnosticHandler to which errors occuring during the management of documents and collections are reported.
If no DiagnosticHandler has been set using this function then subclasses of the ZorbaException class are thrown to report errors.
aDiagnosticHandler | DiagnosticHandler to which errors are reported. The caller retains ownership over the DiagnosticHandler passed as parameter. |
virtual void zorba::XmlDataManager::registerStemmerProvider | ( | StemmerProvider const * | provider | ) | [pure virtual] |
Registers a StemmerProvider to use for stemming of text content in order to perform queries involving full-text.
If no StemmerProvider has been set using this function, then the default StemmerProvider will be used.
provider | If not NULL, sets the StemmerProvider to use; if NULL, removes any previously registered StemmerProvider. |
virtual void zorba::XmlDataManager::registerTokenizerProvider | ( | TokenizerProvider const * | provider | ) | [pure virtual] |
Registers a TokenizerProvider to use for toknenization of text content in order to perform queries involving full-text.
If no TokenizerProvider has been set using this function, then the default TokenizerProvider will be used.
provider | If not NULL, sets the TokenizerProvider to use; if NULL, removes any previously registered TokenizerProvider. |