public class XPathRule extends AbstractRule
Modifier and Type | Field and Description |
---|---|
static EnumeratedProperty<java.lang.String> |
VERSION_DESCRIPTOR |
static StringProperty |
XPATH_DESCRIPTOR |
propertyDescriptors, propertyValuesByDescriptor
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
Constructor and Description |
---|
XPathRule() |
XPathRule(java.lang.String xPath) |
Modifier and Type | Method and Description |
---|---|
void |
apply(java.util.List<? extends Node> nodes,
RuleContext ctx)
Apply the rule to all nodes.
|
java.lang.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.
|
java.util.List<java.lang.String> |
getRuleChainVisits()
Gets the collection of AST node names visited by the Rule on the
RuleChain.
|
boolean |
hasXPathExpression() |
void |
setVersion(java.lang.String version) |
void |
setXPath(java.lang.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, usesTypeResolution
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
definePropertyDescriptor, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
public static final StringProperty XPATH_DESCRIPTOR
public static final EnumeratedProperty<java.lang.String> VERSION_DESCRIPTOR
public void setXPath(java.lang.String xPath)
public void setVersion(java.lang.String version)
public void apply(java.util.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 java.util.List<java.lang.String> getRuleChainVisits()
Rule
getRuleChainVisits
in interface Rule
getRuleChainVisits
in class AbstractRule
Rule.getRuleChainVisits()
public boolean hasXPathExpression()
public java.lang.String dysfunctionReason()
AbstractPropertySource
dysfunctionReason
in interface PropertySource
dysfunctionReason
in class AbstractPropertySource
PropertySource.dysfunctionReason()
Copyright © 2002-2014 InfoEther. All Rights Reserved.