00001 /* 00002 * Copyright 2002-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * imitations under the License. 00015 */ 00016 00017 /* 00018 * XSEC 00019 * 00020 * DSIGXPathFilterExpr := Class that holds an XPath Filter expression 00021 * 00022 * $Id: DSIGXPathFilterExpr.hpp,v 1.6 2004/02/08 10:20:52 blautenb Exp $ 00023 * 00024 */ 00025 00026 #ifndef DSIGXPATHFILTEREXPR_INCLUDE 00027 #define DSIGXPATHFILTEREXPR_INCLUDE 00028 00029 #include <xsec/framework/XSECDefs.hpp> 00030 #include <xsec/dsig/DSIGConstants.hpp> 00031 #include <xsec/utils/XSECSafeBuffer.hpp> 00032 00033 00034 XSEC_DECLARE_XERCES_CLASS(DOMNamedNodeMap); 00035 XSEC_DECLARE_XERCES_CLASS(DOMNode); 00036 XSEC_DECLARE_XERCES_CLASS(DOMElement); 00037 00038 class XSECEnv; 00039 00054 class DSIG_EXPORT DSIGXPathFilterExpr { 00055 00056 public: 00057 00060 00070 DSIGXPathFilterExpr(const XSECEnv * env, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node); 00071 00080 DSIGXPathFilterExpr(const XSECEnv * env); 00081 00090 ~DSIGXPathFilterExpr(); 00091 00093 00097 00104 void load(void); 00105 00114 xpathFilterType getFilterType(void); 00115 00126 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * setFilter(xpathFilterType filterType, 00127 const XMLCh * filterExpr); 00128 00137 const XMLCh * getFilter(void) {return m_expr.rawXMLChBuffer();} 00138 00148 void setNamespace(const XMLCh * prefix, const XMLCh * value); 00149 00161 XERCES_CPP_NAMESPACE_QUALIFIER DOMNamedNodeMap * getNamespaces(void) { 00162 return mp_NSMap; 00163 } 00164 00175 void deleteNamespace(const XMLCh * prefix); 00176 00178 00179 private: 00180 00181 // Just let the TXFM read directly 00182 00183 friend class TXFMXPathFilter; 00184 00185 DSIGXPathFilterExpr(); 00186 DSIGXPathFilterExpr(const DSIGXPathFilterExpr& theOther); 00187 00188 const XSECEnv * mp_env; 00189 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00190 * mp_xpathFilterNode; 00191 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00192 * mp_exprTextNode; 00193 XERCES_CPP_NAMESPACE_QUALIFIER DOMNamedNodeMap 00194 * mp_NSMap; 00195 safeBuffer m_expr; 00196 xpathFilterType m_filterType; 00197 bool m_loaded; 00198 00199 00200 }; 00201 00202 #endif /* DSIGXPATHFILTEREXPR_INCLUDE */