public class XPathRule extends AbstractRule
| Modifier and Type | Field and Description |
|---|---|
static EnumeratedProperty<String> |
VERSION_DESCRIPTOR |
static StringProperty |
XPATH_DESCRIPTOR |
propertyDescriptors, propertyValuesByDescriptorVIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR| Modifier and Type | Method and Description |
|---|---|
void |
apply(List<? extends Node> nodes,
RuleContext ctx)
Apply the rule to all nodes.
|
String |
dysfunctionReason()
Returns a description of why the receiver may be dysfunctional.
|
void |
evaluate(Node node,
RuleContext data)
Evaluate the XPath query with the AST node.
|
List<String> |
getRuleChainVisits()
Gets the collection of AST node names visited by the Rule on the
RuleChain.
|
boolean |
hasXPathExpression() |
void |
setVersion(String version) |
void |
setXPath(String xPath) |
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolutioncopyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValuesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdefinePropertyDescriptor, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValuespublic static final StringProperty XPATH_DESCRIPTOR
public static final EnumeratedProperty<String> VERSION_DESCRIPTOR
public XPathRule()
public XPathRule(String xPath)
public void setXPath(String xPath)
public void setVersion(String version)
public void apply(List<? extends Node> nodes, RuleContext ctx)
nodes - the nodesctx - the rule contextpublic void evaluate(Node node, RuleContext data)
node - The Node that to be checked.data - The RuleContext.public List<String> getRuleChainVisits()
RulegetRuleChainVisits in interface RulegetRuleChainVisits in class AbstractRuleRule.getRuleChainVisits()public boolean hasXPathExpression()
public String dysfunctionReason()
AbstractPropertySourcedysfunctionReason in interface PropertySourcedysfunctionReason in class AbstractPropertySourcePropertySource.dysfunctionReason()Copyright © 2002-2014 InfoEther. All Rights Reserved.