Classes | Public Member Functions | Protected Member Functions
zorba::XmlDataManager Class Reference

Using the XmlDataManager one can manage documents and collections. More...

#include <zorba/xmldatamanager.h>

List of all members.

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 CollectionManagergetCollectionManager () const =0
 Returns a CollectionManager responsible for all collections.
virtual DocumentManagergetDocumentManager () const =0
virtual CollectionManagergetW3CCollectionManager () 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 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 ItemSequence_t parseXML (std::istream &aStream, const String &aBaseURI, 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.

Detailed Description

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.

Examples:

context.cpp, and datamanager.cpp.


Constructor & Destructor Documentation

virtual zorba::XmlDataManager::~XmlDataManager ( ) [inline, protected, virtual]

Destructor.

Definition at line 239 of file xmldatamanager.h.


Member Function Documentation

virtual Item zorba::XmlDataManager::fetch ( const String aURI) const [pure virtual]

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.

Returns:
The collection manager responsible for managing collections.
Examples:
datamanager.cpp.
virtual DocumentManager* zorba::XmlDataManager::getDocumentManager ( ) const [pure virtual]
Examples:
datamanager.cpp.
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.

Returns:
The collection manager responsible for managing collections.
Examples:
datamanager.cpp.
virtual Item zorba::XmlDataManager::parseXML ( std::istream &  aStream) const [pure virtual]

Parse an XML document and return an Item.

Examples:
context.cpp, datamanager.cpp, and simple.cpp.
virtual Item zorba::XmlDataManager::parseXML ( std::istream &  aStream,
const String aBaseURI 
) const [pure virtual]

Parse an XML document and return an Item.

Parameters:
aStreamthe input stream whose content should be parsed
aBaseURIthe 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.

Parameters:
aStreamthe input stream whose content should be parsed
aOptions
See also:
ParseOptions
ParseOptions
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.

Parameters:
aStreamthe input stream whose content should be parsed
aBaseURIthe 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
See also:
ParseOptions
ParseOptions
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.

Parameters:
aDiagnosticHandlerDiagnosticHandler 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.

Parameters:
providerIf 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.

Parameters:
providerIf not NULL, sets the TokenizerProvider to use; if NULL, removes any previously registered TokenizerProvider.

The documentation for this class was generated from the following file:
blog comments powered by Disqus