Class XPathQueryExecutorLoader

java.lang.Object
eu.europa.esig.dss.xml.utils.xpath.XPathQueryExecutorLoader

public class XPathQueryExecutorLoader extends Object
This class is used to load an implementation of a corresponding XPath executor. Currently, the class support two implementations: 1) eu.europa.esig.dss.xml.utils.xpath.XPathQueryExecutor - XPath executor used to process expressions of eu.europa.esig.dss.xml.common.xpath.XPathQuery type. This is the main implementation used in DSS. 2) eu.europa.esig.dss.xml.utils.xpath.XPathStringExecutor - XPath executor based on string XPath expressions, used on a case basis (when XPathQuery processing is not suitable). To make the implementation discoverable, please define the path to a chosen implementation within the files /resources/META-INF/services/eu.europa.esig.dss.xml.utils.xpath.XPathQueryExecutor and /resources/META-INF/services/eu.europa.esig.dss.xml.utils.xpath.XPathStringExecutor, respectively.
  • Constructor Details

    • XPathQueryExecutorLoader

      public XPathQueryExecutorLoader()
      Default constructor
  • Method Details

    • getXPathQueryExecutor

      public XPathQueryExecutor getXPathQueryExecutor()
      Gets the XPathQueryExecutor. This method returns a cached or provided version of XPathQueryExecutor. If no executor is defined, the method will load a new instance of XPathQueryExecutor using ServiceLoader mechanism.
      Returns:
      XPathQueryExecutor
    • setXPathQueryExecutor

      public void setXPathQueryExecutor(XPathQueryExecutor xPathQueryExecutor)
      Sets the XPathQueryExecutor. If used, the provided version of the XPathQueryExecutor is to be used by the implementation.
      Parameters:
      xPathQueryExecutor - XPathQueryExecutor
    • loadXPathQueryExecutor

      protected XPathQueryExecutor loadXPathQueryExecutor()
      Loads the first applicable implementation of the XPathQueryExecutor
      Returns:
      XPathQueryExecutor
    • getXPathStringExecutor

      public XPathStringExecutor getXPathStringExecutor()
      Gets the XPathStringExecutor. This method returns a cached or provided version of XPathStringExecutor. If no executor is defined, the method will load a new instance of XPathStringExecutor using ServiceLoader mechanism.
      Returns:
      XPathStringExecutor
    • setXPathStringExecutor

      public void setXPathStringExecutor(XPathStringExecutor xPathStringExecutor)
      Sets the XPathStringExecutor. If used, the provided version of the XPathStringExecutor is to be used by the implementation.
      Parameters:
      xPathStringExecutor - XPathStringExecutor
    • loadXPathStringExecutor

      protected XPathStringExecutor loadXPathStringExecutor()
      Loads the first applicable implementation of the XPathStringExecutor
      Returns:
      XPathStringExecutor