XQilla Class Reference

Provides factory methods for creating XQQuery and DynamicContext objects. More...

#include <XQilla.hpp>

Inheritance diagram for XQilla:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Flags { NO_STATIC_RESOLUTION = 0x1, NO_ADOPT_CONTEXT = 0x2 }
 Flags used by the XQilla methods. These are used by bitwise OR-ing (|) their values together. More...
enum  Language { XQUERY, XPATH2, XQUERY_FULLTEXT, XPATH2_FULLTEXT }
 Enumeration used to select a language to parse. More...

Public Member Functions

 XQilla (xercesc::MemoryManager *memMgr=0)
 Constructs the object.
 ~XQilla ()
 Destructs the object.

Static Public Member Functions

Parsing Methods
static XQQueryparse (const XMLCh *query, Language language=XQUERY, DynamicContext *context=0, const XMLCh *queryFile=NULL, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
 Parse the expression contained in the given query string.
static XQQueryparse (const xercesc::InputSource &querySrc, Language language=XQUERY, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
 Parse the expression from the given InputSource.
static XQQueryparseFromURI (const XMLCh *queryFile, Language language=XQUERY, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
 Parse the expression residing at the given URL.
Factory Methods
static DynamicContextcreateContext (xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
 Creates a context suitable for parsing an expression with.

Detailed Description

Provides factory methods for creating XQQuery and DynamicContext objects.

This class calls XQillaPlatformUtils::initialize() when it is constructed, and XQillaPlatformUtils::terminate() when it destructs, so there is no need to seperately initialize or terminate either Xerces or XQilla.


Member Enumeration Documentation

enum XQilla::Flags
 

Flags used by the XQilla methods. These are used by bitwise OR-ing (|) their values together.

Enumerator:
NO_STATIC_RESOLUTION  Don't perform static resolution.
NO_ADOPT_CONTEXT  Don't adopt the context and delete it when the XQQuery is deleted.

enum XQilla::Language
 

Enumeration used to select a language to parse.

Enumerator:
XQUERY  Parse an XQuery expression.
XPATH2  Parse an XPath 2.0 expression.
XQUERY_FULLTEXT  Parse an XQuery Full-Text expression.
XPATH2_FULLTEXT  Parse an XPath 2.0 Full-Text expression.


Constructor & Destructor Documentation

XQilla::XQilla xercesc::MemoryManager memMgr = 0  ) 
 

Constructs the object.

In the process, XQillaPlatformUtils::initialize() is called to initialize XQilla and Xerces.

Parameters:
memMgr If provided, this is the MemoryManager used to initialize Xerces.

XQilla::~XQilla  ) 
 

Destructs the object.

In the process, XQillaPlatformUtils::terminate() is called to terminate XQilla and Xerces.


Member Function Documentation

static DynamicContext* XQilla::createContext xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager  )  [static]
 

Creates a context suitable for parsing an expression with.

Parameters:
memMgr The memory manager used to create the DynamicContext.
Returns:
An implementation of DynamicContext

static XQQuery* XQilla::parse const xercesc::InputSource querySrc,
Language  language = XQUERY,
DynamicContext context = 0,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager
[static]
 

Parse the expression from the given InputSource.

Parameters:
querySrc An InputSource which the expression will be parsed from.
language The language to parse the string as. Defaults to XQUERY.
context If specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
flags A bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgr If specified, the memory manager used to create the XQQuery object.
Returns:
The object that represents the parsed expression.
Exceptions:
XQException If a parse error occurs.

static XQQuery* XQilla::parse const XMLCh *  query,
Language  language = XQUERY,
DynamicContext context = 0,
const XMLCh *  queryFile = NULL,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager
[static]
 

Parse the expression contained in the given query string.

Parameters:
query A string containing the expression to parse.
language The language to parse the string as. Defaults to XQUERY.
context If specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
queryFile The name of the file that query originates in. This is passed back to the user in an XQException if an error occurs.
flags A bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgr If specified, the memory manager used to create the XQQuery object.
Returns:
The object that represents the parsed expression.
Exceptions:
XQException If a parse error occurs.

static XQQuery* XQilla::parseFromURI const XMLCh *  queryFile,
Language  language = XQUERY,
DynamicContext context = 0,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager
[static]
 

Parse the expression residing at the given URL.

Parameters:
queryFile The URL of the expression to parse.
language The language to parse the string as. Defaults to XQUERY.
context If specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
flags A bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgr If specified, the memory manager used to create the XQQuery object.
Returns:
The object that represents the parsed expression.
Exceptions:
XQException If a parse error occurs.


The documentation for this class was generated from the following file:
Generated on Fri Jan 19 15:30:57 2007 for XQilla Simple API by  doxygen 1.4.6