SourceForge.net Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

XQilla.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2008
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2008
00005  *     Oracle. All rights reserved.
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  *
00019  * $Id: XQilla.hpp 664 2008-10-08 23:35:50Z jpcs $
00020  */
00021 
00022 #ifndef _XQILLA_07637_HPP
00023 #define _XQILLA_07637_HPP
00024 
00025 #include <xqilla/framework/XQillaExport.hpp>
00026 
00027 #include <xercesc/framework/MemoryManager.hpp>
00028 #include <xercesc/util/PlatformUtils.hpp>
00029 #include <xercesc/util/XMemory.hpp>
00030 
00031 class DynamicContext;
00032 class XQQuery;
00033 class XPath2MemoryManager;
00034 class XQillaConfiguration;
00035 
00036 XERCES_CPP_NAMESPACE_BEGIN
00037 class InputSource;
00038 class XMLBuffer;
00039 XERCES_CPP_NAMESPACE_END
00040 
00048 class XQILLA_API XQilla : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00049 {
00050 public:
00052   enum Flags {
00053     NO_STATIC_RESOLUTION = 0x1, 
00054     NO_ADOPT_CONTEXT     = 0x2, 
00055     DEBUG_QUERY          = 0x4, 
00056     NO_OPTIMIZATION      = 0x8  
00057   };
00058 
00060   enum Language {
00061     XQUERY     = 0x00,
00062     XPATH2     = 0x01,
00063     FULLTEXT   = 0x02,
00064     UPDATE     = 0x04,
00065     EXTENSIONS = 0x08,
00066     XSLT2      = 0x10,
00067 
00068     XQUERY_FULLTEXT        = (XQUERY | FULLTEXT),
00069     XPATH2_FULLTEXT        = (XPATH2 | FULLTEXT),
00070     XQUERY_UPDATE          = (XQUERY | UPDATE),
00071     XQUERY_FULLTEXT_UPDATE = (XQUERY | FULLTEXT | UPDATE),
00072     XSLT2_FULLTEXT         = (XSLT2 | FULLTEXT)
00073   };
00074                                                                                                                                                               
00081   XQilla(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr = 0);
00082 
00087   ~XQilla();
00088 
00090         // @{
00091 
00108   static XQQuery* parse(const XMLCh* query,
00109                         DynamicContext* context = 0,
00110                         const XMLCh* queryFile = NULL,
00111                         unsigned int flags = 0,
00112                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00113                         XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00114 
00129   static XQQuery* parse(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
00130                         DynamicContext* context = 0,
00131                         unsigned int flags = 0,
00132                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00133                         XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00134 
00149   static XQQuery* parseFromURI(const XMLCh* queryFile,
00150                                DynamicContext* context = 0,
00151                                unsigned int flags = 0,
00152                                XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00153                                XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00154 
00156 
00158   // @{
00159 
00165   static DynamicContext *createContext(Language language = XQUERY,
00166                                        XQillaConfiguration *conf = 0,
00167                                        XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00168                                        XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00169 
00171 
00172 private:
00173   static bool readQuery(const XMLCh* queryFile, 
00174                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr, 
00175                         XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00176   static bool readQuery(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc, 
00177                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr, 
00178                         XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00179 };
00180 
00181 #endif

Generated on Fri Sep 25 06:55:26 2009 for XQilla Simple API by  doxygen 1.3.9.1