SourceForge.net Logo
URIResolver.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001, 2008,
3  * DecisionSoft Limited. All rights reserved.
4  * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef _URIRESOLVER_HPP
21 #define _URIRESOLVER_HPP
22 
23 #include <xqilla/framework/XQillaExport.hpp>
24 #include <xqilla/items/Node.hpp>
25 
26 #include <xercesc/util/XMemory.hpp>
27 
28 class DynamicContext;
29 class Sequence;
30 class QueryPathNode;
31 
37 class XQILLA_API URIResolver : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
38 {
39 public:
41  virtual ~URIResolver() {};
42 
48  virtual bool resolveDocument(Sequence &result, const XMLCh* uri, DynamicContext *context, const QueryPathNode *projection) = 0;
49 
55  virtual bool resolveCollection(Sequence &result, const XMLCh* uri, DynamicContext *context, const QueryPathNode *projection) = 0;
56 
60  virtual bool resolveDefaultCollection(Sequence &result, DynamicContext *context, const QueryPathNode *projection) = 0;
61 
69  virtual bool putDocument(const Node::Ptr &document, const XMLCh *uri, DynamicContext *context) = 0;
70 };
71 #endif
URIResolver::putDocument
virtual bool putDocument(const Node::Ptr &document, const XMLCh *uri, DynamicContext *context)=0
Called with any document that has been updated, to allow the user to save the document in any manner ...
RefCountPointer
Super class of all the reference counted wrappers for Items.
Definition: ReferenceCounted.hpp:62
DynamicContext
The execution time dynamic context interface.
Definition: DynamicContext.hpp:39
URIResolver::resolveDocument
virtual bool resolveDocument(Sequence &result, const XMLCh *uri, DynamicContext *context, const QueryPathNode *projection)=0
Resolve the given uri (and baseUri) to a Sequence (reference parameter).
Sequence
An eagerly evaluated result of a query execution.
Definition: Sequence.hpp:40
URIResolver::~URIResolver
virtual ~URIResolver()
virtual destructor, does nothing
Definition: URIResolver.hpp:41
URIResolver::resolveDefaultCollection
virtual bool resolveDefaultCollection(Sequence &result, DynamicContext *context, const QueryPathNode *projection)=0
Resolve the default collection.
URIResolver
This is an abstract class used to resolve URIs in different ways.
Definition: URIResolver.hpp:38
URIResolver::resolveCollection
virtual bool resolveCollection(Sequence &result, const XMLCh *uri, DynamicContext *context, const QueryPathNode *projection)=0
Resolve the given uri (and baseUri) to a Sequence (reference parameter).
Node.hpp
XMemory.hpp