Class BaseXPathCompilerProxy

    • Field Detail

      • nsPrefixToUriMap

        protected final com.google.common.collect.ImmutableMap<String,​String> nsPrefixToUriMap
      • xPathVersion

        protected final transient org.ow2.authzforce.xacml.identifiers.XPathVersion xPathVersion
    • 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 version
        namespacePrefixToUriMap - 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 interface XPathCompilerProxy
        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 with XPathCompiler.declareNamespace(String, String).
        Specified by:
        getDeclaredNamespacePrefixToUriMap in interface XPathCompilerProxy
        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 interface XPathCompilerProxy
        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 interface XPathCompilerProxy
        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 interface XPathCompilerProxy
        See Also:
        XPathCompiler.evaluateSingle(String, XdmItem)
      • compilePattern

        public final net.sf.saxon.s9api.XPathExecutable compilePattern​(String source)
        Specified by:
        compilePattern in interface XPathCompilerProxy
        See Also:
        XPathCompiler.compilePattern(String)