SourceForge.net Logo
Public Member Functions | List of all members
DynamicContext Class Referenceabstract

The execution time dynamic context interface. More...

#include <DynamicContext.hpp>

Inheritance diagram for DynamicContext:
Inheritance graph
[legend]

Public Member Functions

virtual ~DynamicContext ()
 
virtual DynamicContextcreateModuleDynamicContext (const DynamicContext *moduleCtx, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const =0
 
virtual void clearDynamicContext ()=0
 Resets the dynamic context, as if it had never been used. More...
 
virtual Item::Ptr getContextItem () const =0
 Get the context Item. More...
 
virtual void setContextItem (const Item::Ptr &item)=0
 Set the context item to item. More...
 
virtual size_t getContextPosition () const =0
 Get the context position. More...
 
virtual void setContextPosition (size_t pos)=0
 Set the context position. More...
 
virtual size_t getContextSize () const =0
 Get the context size. More...
 
virtual void setContextSize (size_t size)=0
 Set the context size. More...
 
virtual const VariableStoregetVariableStore () const =0
 get the variable store More...
 
virtual void setVariableStore (const VariableStore *store)=0
 set the variable store More...
 
virtual const VariableStoregetGlobalVariableStore () const =0
 get the variable store for globally scoped variables More...
 
virtual void setGlobalVariableStore (const VariableStore *store)=0
 set the variable store for globally scoped variables More...
 
virtual void setExternalVariable (const XMLCh *namespaceURI, const XMLCh *name, const Result &value)=0
 set the value of an external global variable with the given uri/localname pair More...
 
virtual void setExternalVariable (const XMLCh *qname, const Result &value)=0
 set the value of an external global variable with the given QName More...
 
virtual const RegexGroupStoregetRegexGroupStore () const =0
 get the regex group store More...
 
virtual void setRegexGroupStore (const RegexGroupStore *store)=0
 set the regex group store More...
 
virtual time_t getCurrentTime () const =0
 Return the current time. More...
 
virtual void setCurrentTime (time_t newTime)=0
 Set the current time. More...
 
virtual ATDurationOrDerived::Ptr getImplicitTimezone () const =0
 Return the implicit timezone for this system. More...
 
virtual void setImplicitTimezone (const ATDurationOrDerived::Ptr &timezoneAsDuration)=0
 Set the implicit timezone. More...
 
virtual void registerURIResolver (URIResolver *resolver, bool adopt)=0
 Register a callback object for resolving URIs. More...
 
virtual URIResolvergetDefaultURIResolver () const =0
 Returns the default URIResolver. More...
 
virtual void setDefaultURIResolver (URIResolver *resolver, bool adopt)=0
 Sets the default URIResolver. More...
 
virtual void setDebugListener (DebugListener *listener)=0
 Set the listener for debug messages. More...
 
virtual DebugListenergetDebugListener () const =0
 Gets the listener for debug messages. More...
 
virtual void setStackFrame (const StackFrame *frame)=0
 Sets the current stack frame whilst debugging. More...
 
virtual const StackFramegetStackFrame () const =0
 Gets the listener for debug messages. More...
 
virtual Node::Ptr parseDocument (xercesc::InputSource &srcToUse, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
 Parse an XML document from the provided InputSource. More...
 
virtual Sequence resolveDocument (const XMLCh *uri, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
 Resolve the given uri (and baseUri) to an XML document. More...
 
virtual Sequence resolveCollection (const XMLCh *uri, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
 Resolve the given uri (and baseUri) to a sequence of Node objects. More...
 
virtual Sequence resolveDefaultCollection (const QueryPathNode *projection=0)=0
 Resolve the default collection to a sequence of Node objects. More...
 
virtual bool putDocument (const Node::Ptr &document, const XMLCh *uri)=0
 Attempts to put the document specified to the given URI by calling the registered URIResolver objects. More...
 
virtual SequenceBuildercreateSequenceBuilder () const =0
 Create a new SequenceBuilder, which is used to turn a stream of events into a Sequence. More...
 
virtual UpdateFactorycreateUpdateFactory () const =0
 Creates a new UpdateFactory, used for performing updates. More...
 
virtual void testInterrupt () const =0
 Test if the query should be interrupted, and throw if so. More...
 
- Public Member Functions inherited from StaticContext
virtual ~StaticContext ()
 
virtual DynamicContextcreateModuleContext (xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const =0
 
virtual DynamicContextcreateDynamicContext (xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const =0
 
virtual DynamicContextcreateDebugQueryContext (const Item::Ptr &contextItem, size_t contextPosition, size_t contextSize, const VariableStore *variables, const xercesc::DOMXPathNSResolver *nsResolver, const XMLCh *defaultElementNS, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const =0
 
virtual XQillaConfigurationgetConfiguration () const =0
 Returns the configuration object for this context. More...
 
virtual XQilla::Language getLanguage () const =0
 Returns the lanuage that this context is for. More...
 
virtual ItemFactorygetItemFactory () const =0
 Returns the ItemFactory for this context, which is used to create XQilla items and other objects. More...
 
virtual void setItemFactory (ItemFactory *factory)=0
 Sets the ItemFactory for this context. More...
 
virtual const StaticTypegetContextItemType () const =0
 Get the static type of the context item. More...
 
virtual void setContextItemType (const StaticType &st)=0
 Set the static type of the context item. More...
 
virtual bool getXPath1CompatibilityMode () const =0
 Get the current XPath 1.0 compatibility mode. More...
 
virtual void setXPath1CompatibilityMode (bool newMode)=0
 Set the current XPath 1.0 compatibility mode. More...
 
virtual const
xercesc::DOMXPathNSResolver
getNSResolver () const =0
 Get the NS resolver. More...
 
virtual const XMLCh * getUriBoundToPrefix (const XMLCh *prefix, const LocationInfo *location=0) const =0
 returns the URI that is bound in prefix in the current scope or zero length string otherwise More...
 
virtual const XMLCh * getPrefixBoundToUri (const XMLCh *uri) const =0
 returns the prefix that is bound in uri in the current scope or zero length string otherwise More...
 
virtual void setNSResolver (const xercesc::DOMXPathNSResolver *resolver)=0
 Set the NS resolver. More...
 
virtual void setNamespaceBinding (const XMLCh *prefix, const XMLCh *uri)=0
 Binds a prefix to a namespace URI. More...
 
virtual const XMLCh * getDefaultElementAndTypeNS () const =0
 get the value of the default namespace for elements and types More...
 
virtual void setDefaultElementAndTypeNS (const XMLCh *newNS)=0
 set the value of the default namespace for elements and types More...
 
virtual const XMLCh * getDefaultFuncNS () const =0
 Return the default namespace for functions. More...
 
virtual void setDefaultFuncNS (const XMLCh *newNS)=0
 Set the default namespace for functions. More...
 
virtual DocumentCachegetDocumentCache () const =0
 retrieve the repository for the grammars More...
 
virtual void setDocumentCache (DocumentCache *docCache)=0
 sets the repository for the grammars More...
 
virtual bool isTypeOrDerivedFromType (const XMLCh *const uri, const XMLCh *const typeName, const XMLCh *const uriToCheck, const XMLCh *const typeNameToCheck) const =0
 returns true if the type represented by uri:typename is an instance of uriToCheck:typeNameToCheck More...
 
virtual void setXMLEntityResolver (xercesc::XMLEntityResolver *const handler)=0
 Sets the XMLEntityResolver that is used by Xerces when it is used to parse documents. More...
 
virtual
xercesc::XMLEntityResolver
getXMLEntityResolver () const =0
 Returns the entity resolver currently set. More...
 
virtual void setModuleResolver (ModuleResolver *resolver)=0
 Register a callback object for resolving module URIs. More...
 
virtual ModuleResolvergetModuleResolver () const =0
 Returns the module resolver currently set. More...
 
virtual VectorOfStringsresolveModuleURI (const XMLCh *uri) const =0
 
virtual void addSchemaLocation (const XMLCh *uri, VectorOfStrings *locations, const LocationInfo *location=0)=0
 add the location for the grammar of a specific namespace More...
 
virtual VariableTypeStoregetVariableTypeStore ()=0
 get the variable type store More...
 
virtual void addTemplate (XQUserFunction *tp)=0
 adds a template definition to the template tables More...
 
virtual const XQUserFunction * lookUpNamedTemplate (const XMLCh *uri, const XMLCh *name) const =0
 look up a template definition by name More...
 
virtual const UserFunctionsgetTemplateRules () const =0
 Return a vector of all the templates with patterns. More...
 
virtual void addCustomFunction (FuncFactory *func)=0
 adds a custom function to the function table More...
 
virtual void removeCustomFunction (FuncFactory *func)=0
 removes a custom function to the function table More...
 
virtual ASTNode * lookUpFunction (const XMLCh *uri, const XMLCh *name, const VectorOfASTNodes &v, const LocationInfo *location=0) const =0
 returns a function object with the given uri, localname and number of arguments triple More...
 
virtual void setExternalFunctionResolver (ExternalFunctionResolver *resolver)=0
 Register a callback object for resolving external function implementations. More...
 
virtual ExternalFunctionResolvergetExternalFunctionResolver () const =0
 Returns the external function resolver currently set. More...
 
virtual void addExternalFunction (const ExternalFunction *func)=0
 adds an external function implementation to the function table More...
 
virtual const ExternalFunctionlookUpExternalFunction (const XMLCh *uri, const XMLCh *name, size_t numArgs) const =0
 returns an external function implementation for the given uri and localname More...
 
virtual CollationgetCollation (const XMLCh *const URI, const LocationInfo *location=0) const =0
 Get the implementation for the specified collation. More...
 
virtual void addCollation (Collation *collation)=0
 Add a collation. More...
 
virtual CollationgetDefaultCollation (const LocationInfo *location=0) const =0
 Get the default collation. More...
 
virtual void setDefaultCollation (const XMLCh *const URI)=0
 Specify which collation is the default one. More...
 
virtual const XMLCh * getBaseURI () const =0
 Return the base URI. More...
 
virtual void setBaseURI (const XMLCh *newURI)=0
 Set the base URI. More...
 
virtual NodeSetOrdering getNodeSetOrdering () const =0
 Return the ordering method for node sets. More...
 
virtual void setNodeSetOrdering (NodeSetOrdering newOrder)=0
 Set the ordering method for node sets. More...
 
virtual ConstructionMode getConstructionMode () const =0
 Return the construction mode. More...
 
virtual void setConstructionMode (ConstructionMode newMode)=0
 Set the construction mode. More...
 
virtual void setPreserveBoundarySpace (bool value)=0
 Set the policy for boundary space. More...
 
virtual bool getPreserveBoundarySpace () const =0
 Get the policy for boundary space. More...
 
virtual FLWOROrderingMode getDefaultFLWOROrderingMode () const =0
 Return the default ordering mode for FLWOR blocks. More...
 
virtual void setDefaultFLWOROrderingMode (FLWOROrderingMode newMode)=0
 Set the default ordering mode for FLWOR blocks. More...
 
virtual void setInheritNamespaces (bool value)=0
 Set the policy for namespace inheritance. More...
 
virtual bool getInheritNamespaces () const =0
 Get the policy for namespace inheritance. More...
 
virtual void setPreserveNamespaces (bool value)=0
 Set the policy for namespace copy. More...
 
virtual bool getPreserveNamespaces () const =0
 Get the policy for namespace copy. More...
 
virtual void setRevalidationMode (DocumentCache::ValidationMode mode)=0
 Set the revalidation mode. More...
 
virtual
DocumentCache::ValidationMode 
getRevalidationMode () const =0
 Get the revalidation mode. More...
 
virtual void setMessageListener (MessageListener *listener)=0
 Set the listener for warning and trace messages. More...
 
virtual MessageListenergetMessageListener () const =0
 Gets the listener for warning and trace messages. More...
 
virtual void setModule (XQQuery *module)=0
 Set the module. More...
 
virtual XQQuerygetModule () const =0
 Get the module. More...
 
virtual bool getProjection () const =0
 Gets whether document projection is enabled. More...
 
virtual void setProjection (bool enabled)=0
 Sets whether document projection is enabled. More...
 
virtual bool getDoLintWarnings () const =0
 
virtual void setDoLintWarnings (bool enabled)=0
 
virtual const XMLCh * allocateTempVarName (const XMLCh *prefix=0)=0
 Return a unique name that can be used for a temporary variable. More...
 
virtual XPath2MemoryManagergetMemoryManager () const =0
 Get the memory manager. More...
 
virtual void setMemoryManager (XPath2MemoryManager *memMgr)=0
 Set the memory manager to the one given. More...
 
virtual void setFTCase (FTCaseOption option)=0
 Set default full text query case option. More...
 
virtual FTCaseOption getFTCase ()=0
 
- Public Member Functions inherited from xercesc::XMemory
void * operator new (size_t size)
 This method overrides operator new. More...
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new. More...
 
void operator delete (void *p)
 This method overrides operator delete. More...
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new. More...
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new. More...
 

Additional Inherited Members

- Public Types inherited from StaticContext
enum  NodeSetOrdering { ORDERING_ORDERED, ORDERING_UNORDERED }
 
enum  ConstructionMode { CONSTRUCTION_MODE_PRESERVE, CONSTRUCTION_MODE_STRIP }
 
enum  FLWOROrderingMode { FLWOR_ORDER_EMPTY_GREATEST, FLWOR_ORDER_EMPTY_LEAST }
 
enum  FTCaseOption {
  NONE, CASE_INSENSITIVE, CASE_SENSITIVE, UPPERCASE,
  LOWERCASE
}
 
- Protected Member Functions inherited from xercesc::XMemory
 XMemory ()
 Protected default constructor. More...
 

Detailed Description

The execution time dynamic context interface.

Constructor & Destructor Documentation

virtual DynamicContext::~DynamicContext ( )
inlinevirtual

Member Function Documentation

virtual void DynamicContext::clearDynamicContext ( )
pure virtual

Resets the dynamic context, as if it had never been used.

virtual DynamicContext* DynamicContext::createModuleDynamicContext ( const DynamicContext moduleCtx,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager 
) const
pure virtual
virtual SequenceBuilder* DynamicContext::createSequenceBuilder ( ) const
pure virtual

Create a new SequenceBuilder, which is used to turn a stream of events into a Sequence.

virtual UpdateFactory* DynamicContext::createUpdateFactory ( ) const
pure virtual

Creates a new UpdateFactory, used for performing updates.

Caller owns the returned object, and should delete it

virtual Item::Ptr DynamicContext::getContextItem ( ) const
pure virtual

Get the context Item.

virtual size_t DynamicContext::getContextPosition ( ) const
pure virtual

Get the context position.

virtual size_t DynamicContext::getContextSize ( ) const
pure virtual

Get the context size.

virtual time_t DynamicContext::getCurrentTime ( ) const
pure virtual

Return the current time.

virtual DebugListener* DynamicContext::getDebugListener ( ) const
pure virtual

Gets the listener for debug messages.

virtual URIResolver* DynamicContext::getDefaultURIResolver ( ) const
pure virtual

Returns the default URIResolver.

virtual const VariableStore* DynamicContext::getGlobalVariableStore ( ) const
pure virtual

get the variable store for globally scoped variables

virtual ATDurationOrDerived::Ptr DynamicContext::getImplicitTimezone ( ) const
pure virtual

Return the implicit timezone for this system.

virtual const RegexGroupStore* DynamicContext::getRegexGroupStore ( ) const
pure virtual

get the regex group store

Referenced by AutoRegexGroupStoreReset::AutoRegexGroupStoreReset().

virtual const StackFrame* DynamicContext::getStackFrame ( ) const
pure virtual

Gets the listener for debug messages.

Referenced by AutoStackFrameReset::AutoStackFrameReset().

virtual const VariableStore* DynamicContext::getVariableStore ( ) const
pure virtual

get the variable store

Referenced by AutoVariableStoreReset::AutoVariableStoreReset().

virtual Node::Ptr DynamicContext::parseDocument ( xercesc::InputSource srcToUse,
const LocationInfo location = 0,
const QueryPathNode *  projection = 0 
)
pure virtual

Parse an XML document from the provided InputSource.

virtual bool DynamicContext::putDocument ( const Node::Ptr document,
const XMLCh *  uri 
)
pure virtual

Attempts to put the document specified to the given URI by calling the registered URIResolver objects.

Returns whether the operation was successful.

virtual void DynamicContext::registerURIResolver ( URIResolver resolver,
bool  adopt 
)
pure virtual

Register a callback object for resolving URIs.

Multiple URIResolver objects can be registered with the DynamicContext at the same time. The most recently added URIResolver will be called first, and if it returns false, subsequent ones will be called - ending in a call to the fallback routines.

If "adopt" is false, the DynamicContext will not adopt this object, making the user responsible for making sure that the URIResolver object's lifespan matches or exceeds the life of the DynamicContext.

virtual Sequence DynamicContext::resolveCollection ( const XMLCh *  uri,
const LocationInfo location = 0,
const QueryPathNode *  projection = 0 
)
pure virtual

Resolve the given uri (and baseUri) to a sequence of Node objects.

If the uri is relative, the base uri is obtained from the context.

virtual Sequence DynamicContext::resolveDefaultCollection ( const QueryPathNode *  projection = 0)
pure virtual

Resolve the default collection to a sequence of Node objects.

virtual Sequence DynamicContext::resolveDocument ( const XMLCh *  uri,
const LocationInfo location = 0,
const QueryPathNode *  projection = 0 
)
pure virtual

Resolve the given uri (and baseUri) to an XML document.

If the uri is relative, the base uri is obtained from the context.

virtual void DynamicContext::setContextItem ( const Item::Ptr item)
pure virtual

Set the context item to item.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setContextPosition ( size_t  pos)
pure virtual

Set the context position.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setContextSize ( size_t  size)
pure virtual

Set the context size.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setCurrentTime ( time_t  newTime)
pure virtual

Set the current time.

virtual void DynamicContext::setDebugListener ( DebugListener listener)
pure virtual

Set the listener for debug messages.

virtual void DynamicContext::setDefaultURIResolver ( URIResolver resolver,
bool  adopt 
)
pure virtual

Sets the default URIResolver.

virtual void DynamicContext::setExternalVariable ( const XMLCh *  namespaceURI,
const XMLCh *  name,
const Result value 
)
pure virtual

set the value of an external global variable with the given uri/localname pair

virtual void DynamicContext::setExternalVariable ( const XMLCh *  qname,
const Result value 
)
pure virtual

set the value of an external global variable with the given QName

virtual void DynamicContext::setGlobalVariableStore ( const VariableStore store)
pure virtual

set the variable store for globally scoped variables

virtual void DynamicContext::setImplicitTimezone ( const ATDurationOrDerived::Ptr timezoneAsDuration)
pure virtual

Set the implicit timezone.

virtual void DynamicContext::setRegexGroupStore ( const RegexGroupStore store)
pure virtual

set the regex group store

virtual void DynamicContext::setStackFrame ( const StackFrame frame)
pure virtual

Sets the current stack frame whilst debugging.

virtual void DynamicContext::setVariableStore ( const VariableStore store)
pure virtual

set the variable store

virtual void DynamicContext::testInterrupt ( ) const
pure virtual

Test if the query should be interrupted, and throw if so.


The documentation for this class was generated from the following file: