Class XPathQueryExecutorLoader
java.lang.Object
eu.europa.esig.dss.xml.utils.xpath.XPathQueryExecutorLoader
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theXPathQueryExecutor.Gets theXPathStringExecutor.protected XPathQueryExecutorLoads the first applicable implementation of theXPathQueryExecutorprotected XPathStringExecutorLoads the first applicable implementation of theXPathStringExecutorvoidsetXPathQueryExecutor(XPathQueryExecutor xPathQueryExecutor) Sets theXPathQueryExecutor.voidsetXPathStringExecutor(XPathStringExecutor xPathStringExecutor) Sets theXPathStringExecutor.
-
Constructor Details
-
XPathQueryExecutorLoader
public XPathQueryExecutorLoader()Default constructor
-
-
Method Details
-
getXPathQueryExecutor
Gets theXPathQueryExecutor. This method returns a cached or provided version ofXPathQueryExecutor. If no executor is defined, the method will load a new instance ofXPathQueryExecutorusing ServiceLoader mechanism.- Returns:
XPathQueryExecutor
-
setXPathQueryExecutor
Sets theXPathQueryExecutor. If used, the provided version of the XPathQueryExecutor is to be used by the implementation.- Parameters:
xPathQueryExecutor-XPathQueryExecutor
-
loadXPathQueryExecutor
Loads the first applicable implementation of theXPathQueryExecutor- Returns:
XPathQueryExecutor
-
getXPathStringExecutor
Gets theXPathStringExecutor. This method returns a cached or provided version ofXPathStringExecutor. If no executor is defined, the method will load a new instance ofXPathStringExecutorusing ServiceLoader mechanism.- Returns:
XPathStringExecutor
-
setXPathStringExecutor
Sets theXPathStringExecutor. If used, the provided version of the XPathStringExecutor is to be used by the implementation.- Parameters:
xPathStringExecutor-XPathStringExecutor
-
loadXPathStringExecutor
Loads the first applicable implementation of theXPathStringExecutor- Returns:
XPathStringExecutor
-