Class BaseXPathCompilerProxy
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.expression.BaseXPathCompilerProxy
-
- All Implemented Interfaces:
XPathCompilerProxy
- Direct Known Subclasses:
BasicImmutableXPathCompilerProxy
public abstract class BaseXPathCompilerProxy extends Object implements XPathCompilerProxy
Base implementation ofXPathCompilerProxy
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.collect.ImmutableMap<String,String>
nsPrefixToUriMap
protected org.ow2.authzforce.xacml.identifiers.XPathVersion
xPathVersion
-
Constructor Summary
Constructors Constructor Description BaseXPathCompilerProxy(org.ow2.authzforce.xacml.identifiers.XPathVersion xpathVersion, Map<String,String> namespacePrefixToUriMap)
Creates namespace-aware XPathCompiler for a given XPath version
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.saxon.s9api.XPathExecutable
compile(String source)
net.sf.saxon.s9api.XPathExecutable
compilePattern(String source)
net.sf.saxon.s9api.XdmValue
evaluate(String expression, net.sf.saxon.s9api.XdmItem contextItem)
net.sf.saxon.s9api.XdmItem
evaluateSingle(String expression, net.sf.saxon.s9api.XdmItem contextItem)
com.google.common.collect.ImmutableMap<String,String>
getDeclaredNamespacePrefixToUriMap()
Get namespace prefix-URI mappings to be part of the static context for XPath expressions compiled with this XPath compiler, i.e.org.ow2.authzforce.xacml.identifiers.XPathVersion
getXPathVersion()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.expression.XPathCompilerProxy
getAllowedVariables
-
-
-
-
Constructor Detail
-
BaseXPathCompilerProxy
public BaseXPathCompilerProxy(org.ow2.authzforce.xacml.identifiers.XPathVersion xpathVersion, Map<String,String> namespacePrefixToUriMap) throws IllegalArgumentException
Creates namespace-aware XPathCompiler for a given XPath version- Parameters:
xpathVersion
- XPath versionnamespacePrefixToUriMap
- namespace-prefix-to-URI mappings- Throws:
IllegalArgumentException
- if XPath version not supported
-
-
Method Detail
-
getXPathVersion
public org.ow2.authzforce.xacml.identifiers.XPathVersion getXPathVersion()
- Specified by:
getXPathVersion
in interfaceXPathCompilerProxy
- See Also:
XPathCompiler.getLanguageVersion()
-
getDeclaredNamespacePrefixToUriMap
public com.google.common.collect.ImmutableMap<String,String> getDeclaredNamespacePrefixToUriMap()
Description copied from interface:XPathCompilerProxy
Get namespace prefix-URI mappings to be part of the static context for XPath expressions compiled with this XPath compiler, i.e. declared withXPathCompiler.declareNamespace(String, String)
.- Specified by:
getDeclaredNamespacePrefixToUriMap
in interfaceXPathCompilerProxy
- Returns:
- namespace prefix-URI bindings declared for this XPathCompiler
-
compile
public net.sf.saxon.s9api.XPathExecutable compile(String source) throws net.sf.saxon.s9api.SaxonApiException
- Specified by:
compile
in interfaceXPathCompilerProxy
- Throws:
net.sf.saxon.s9api.SaxonApiException
- See Also:
XPathCompiler.compile(String)
-
evaluate
public final net.sf.saxon.s9api.XdmValue evaluate(String expression, net.sf.saxon.s9api.XdmItem contextItem) throws net.sf.saxon.s9api.SaxonApiException
- Specified by:
evaluate
in interfaceXPathCompilerProxy
- Throws:
net.sf.saxon.s9api.SaxonApiException
- See Also:
XPathCompiler.evaluate(String, XdmItem)
-
evaluateSingle
public final net.sf.saxon.s9api.XdmItem evaluateSingle(String expression, net.sf.saxon.s9api.XdmItem contextItem)
- Specified by:
evaluateSingle
in interfaceXPathCompilerProxy
- See Also:
XPathCompiler.evaluateSingle(String, XdmItem)
-
compilePattern
public final net.sf.saxon.s9api.XPathExecutable compilePattern(String source)
- Specified by:
compilePattern
in interfaceXPathCompilerProxy
- See Also:
XPathCompiler.compilePattern(String)
-
-