Interface XPathRuleQuery
-
- All Known Implementing Classes:
AbstractXPathRuleQuery
,JaxenXPathRuleQuery
,SaxonXPathRuleQuery
@InternalApi @Deprecated public interface XPathRuleQuery
Deprecated.This will be internalized in 7.0.0.This interface captures the logic needed by XPathRule to implement an XPath based query on an AST Node.Implementations of this class do not need to be thread-safe, but they will be reused to query against different AST Nodes. Therefore, internal state should be maintained in a fashion consistent with reuse. Further, implementations are recommended to manage internal state that is invariant over AST Nodes in a fashion which facilities high performance (e.g. caching).
-
-
Field Summary
Fields Modifier and Type Field Description static String
XPATH_1_0
Deprecated.UseXPathVersion
static String
XPATH_1_0_COMPATIBILITY
Deprecated.UseXPathVersion
static String
XPATH_2_0
Deprecated.UseXPathVersion
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description List<Node>
evaluate(Node node, RuleContext data)
Deprecated.Evaluate the XPath query against the given Node.List<String>
getRuleChainVisits()
Deprecated.Indicates which AST Nodes (if any) should be used with the RuleChain.void
setProperties(Map<PropertyDescriptor<?>,Object> properties)
Deprecated.Set the properties to use during the XPath query.void
setVersion(String version)
Deprecated.Set the XPath version to be used.void
setXPath(String xpath)
Deprecated.Set the XPath query string to be used.
-
-
-
Field Detail
-
XPATH_1_0
@Deprecated static final String XPATH_1_0
Deprecated.UseXPathVersion
XPath 1.0 version.- See Also:
- Constant Field Values
-
XPATH_1_0_COMPATIBILITY
@Deprecated static final String XPATH_1_0_COMPATIBILITY
Deprecated.UseXPathVersion
XPath 1.0 compatibility version.- See Also:
- Constant Field Values
-
XPATH_2_0
@Deprecated static final String XPATH_2_0
Deprecated.UseXPathVersion
XPath 2.0 version.- See Also:
- Constant Field Values
-
-
Method Detail
-
setXPath
void setXPath(String xpath)
Deprecated.Set the XPath query string to be used.- Parameters:
xpath
- The XPath query string.
-
setVersion
void setVersion(String version) throws UnsupportedOperationException
Deprecated.Set the XPath version to be used.- Parameters:
version
- The XPath version.- Throws:
UnsupportedOperationException
- if the version cannot be handled.
-
setProperties
void setProperties(Map<PropertyDescriptor<?>,Object> properties)
Deprecated.Set the properties to use during the XPath query.
-
getRuleChainVisits
List<String> getRuleChainVisits()
Deprecated.Indicates which AST Nodes (if any) should be used with the RuleChain. Use of the RuleChain will allow the query execute on a targeted sub-tree of the AST, instead of the entire AST from the root. This can result in great performance benefits.
-
evaluate
List<Node> evaluate(Node node, RuleContext data)
Deprecated.Evaluate the XPath query against the given Node.- Parameters:
node
- The Node.data
- The RuleContext.- Returns:
- The matching Nodes.
-
-