com.ihr.xbrl.om.formula.util

## Class XPathHelper

- java.lang.Object
- - com.ihr.xbrl.om.formula.util.XPathHelper

-     public class XPathHelper
      extends java.lang.Object

  The Class XPathHelper.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XPathHelper(net.sf.saxon.s9api.XPathCompiler compiler, XBRLVariableSetResource set, java.util.Collection<javax.xml.namespace.QName> declaredVariables, XMLEvaluationContextProvider contextProvider)` Instantiates a new x path helper.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `evaluateBoolean(net.sf.saxon.s9api.XPathSelector sel)` Evaluate boolean.
    `net.sf.saxon.s9api.XdmValue` | `evaluateList(java.lang.String expression)` Evaluate list.
    `net.sf.saxon.s9api.XdmValue` | `evaluateList(net.sf.saxon.s9api.XPathSelector sel)` Evaluate list.
    `net.sf.saxon.s9api.XdmItem` | `evaluateNode(java.lang.String expression)` Evaluate node.
    `net.sf.saxon.s9api.XdmItem` | `evaluateNode(net.sf.saxon.s9api.XPathSelector sel)` Evaluate node.
    `java.lang.String` | `evaluateString(java.lang.String expression)` Evaluate string.
    `net.sf.saxon.s9api.XPathCompiler` | `getCompiler()` Gets the compiler.
    `DTSContainer` | `getContainer()` Gets the container.
    `XMLEvaluationContextProvider` | `getContextProvider()` Gets the context provider.
    `XBRLVariableSetResource` | `getSet()` Gets the sets the.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XPathHelper

          public XPathHelper(net.sf.saxon.s9api.XPathCompiler compiler,
                     XBRLVariableSetResource set,
                     java.util.Collection<javax.xml.namespace.QName> declaredVariables,
                     XMLEvaluationContextProvider contextProvider)
                      throws XFValidationException

      Instantiates a new x path helper.
      Parameters:
        `compiler` - the XPathCompiler associated with this object instance.
        `set` - this variable is used internally in the evaluate* methods and in the getContainer() method in order to expose the DTS container to other objects.
        `declaredVariables` - a collection of QNames with the variable names declared for the resolution of XPath expressions
        `contextProvider` - the context provider for the evaluation of XPath Expressions
      Throws:
        `XFValidationException` - the XF validation exception

  - ### Method Detail

    - #### getContextProvider

          public XMLEvaluationContextProvider getContextProvider()

      Gets the context provider.
      Returns:
        the context provider

    - #### evaluateNode

          public net.sf.saxon.s9api.XdmItem evaluateNode(net.sf.saxon.s9api.XPathSelector sel)

      Evaluate node.
      Parameters:
        `sel` - the sel
      Returns:
        the xdm item

    - #### evaluateNode

          public net.sf.saxon.s9api.XdmItem evaluateNode(java.lang.String expression)

      Evaluate node.
      Parameters:
        `expression` - the expression
      Returns:
        the xdm item

    - #### evaluateString

          public java.lang.String evaluateString(java.lang.String expression)

      Evaluate string.
      Parameters:
        `expression` - the expression
      Returns:
        the string

    - #### getSet

          public XBRLVariableSetResource getSet()

      Gets the sets the.
      Returns:
        the sets the

    - #### getContainer

          public DTSContainer getContainer()

      Gets the container.
      Returns:
        the container

    - #### getCompiler

          public net.sf.saxon.s9api.XPathCompiler getCompiler()

      Gets the compiler.
      Returns:
        the compiler

    - #### evaluateList

          public net.sf.saxon.s9api.XdmValue evaluateList(java.lang.String expression)

      Evaluate list.
      Parameters:
        `expression` - the expression
      Returns:
        the xdm value

    - #### evaluateList

          public net.sf.saxon.s9api.XdmValue evaluateList(net.sf.saxon.s9api.XPathSelector sel)

      Evaluate list.
      Parameters:
        `sel` - the sel
      Returns:
        the xdm value

    - #### evaluateBoolean

          public boolean evaluateBoolean(net.sf.saxon.s9api.XPathSelector sel)
                                  throws XFValidationException

      Evaluate boolean.
      Parameters:
        `sel` - the sel
      Returns:
        true, if successful
      Throws:
        `XFValidationException` - the XF validation exception