Package de.pangaea.metadataportal.processor

## Class XPathResolverImpl

- java.lang.Object
- - de.pangaea.metadataportal.processor.XPathResolverImpl

- All Implemented Interfaces:
    `XPathFunctionResolver`, `XPathVariableResolver`

      public final class XPathResolverImpl
      extends Object
      implements XPathFunctionResolver, XPathVariableResolver

  Helper class that implements several XPath interfaces to supply variables and functions to XPath expressions. This is a singleton!
  Author:
    Uwe Schindler

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Set<QName>` | `BASE_VARIABLES` |
    `static String` | `DOCUMENT_PROCESSOR_NAMESPACE` |
    `static QName` | `VARIABLE_DOC_DATESTAMP` |
    `static QName` | `VARIABLE_DOC_IDENTIFIER` |
    `static QName` | `VARIABLE_HARVESTER_ID` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Map<QName,​Object>` | `getCurrentVariableMap()` |
    `static XPathResolverImpl` | `getInstance()` |
    `Map<QName,​Object>` | `initVariables()` |
    `XPathFunction` | `resolveFunction​(QName functionName, int arity)` |
    `Object` | `resolveVariable​(QName variableName)` |
    `void` | `unsetVariables()` |

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

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

- - ### Field Detail

    - #### DOCUMENT_PROCESSOR_NAMESPACE

          public static final String DOCUMENT_PROCESSOR_NAMESPACE

    - #### VARIABLE_DOC_IDENTIFIER

          public static final QName VARIABLE_DOC_IDENTIFIER

    - #### VARIABLE_DOC_DATESTAMP

          public static final QName VARIABLE_DOC_DATESTAMP

    - #### VARIABLE_HARVESTER_ID

          public static final QName VARIABLE_HARVESTER_ID

    - #### BASE_VARIABLES

          public static final Set<QName> BASE_VARIABLES

  - ### Method Detail

    - #### getInstance

          public static XPathResolverImpl getInstance()

    - #### resolveFunction

          public XPathFunction resolveFunction​(QName functionName,
                                               int arity)

      Specified by:
        `resolveFunction` in interface `XPathFunctionResolver`

    - #### resolveVariable

          public Object resolveVariable​(QName variableName)

      Specified by:
        `resolveVariable` in interface `XPathVariableResolver`

    - #### initVariables

          public Map<QName,​Object> initVariables()

    - #### getCurrentVariableMap

          public Map<QName,​Object> getCurrentVariableMap()

    - #### unsetVariables

          public void unsetVariables()