public class XPathPattern extends Object implements Pattern
XPathPattern
is an implementation of Pattern
which uses an XPath xpath.
Modifier and Type | Field and Description |
---|---|
private org.jaxen.Context |
context |
private org.jaxen.pattern.Pattern |
pattern |
private String |
text |
ANY_NODE, DEFAULT_PRIORITY, NONE, NUMBER_OF_TYPES
Constructor and Description |
---|
XPathPattern(org.jaxen.pattern.Pattern pattern) |
XPathPattern(String text) |
Modifier and Type | Method and Description |
---|---|
protected org.jaxen.ContextSupport |
getContextSupport() |
String |
getMatchesNodeName()
For patterns which only match an ATTRIBUTE_NODE or an
ELEMENT_NODE then this pattern may return the name of the
element or attribute it matches.
|
short |
getMatchType() |
double |
getPriority()
Returns the default resolution policy of the pattern according to the
XSLT conflict resolution spec.
|
String |
getText() |
Pattern[] |
getUnionPatterns()
If this pattern is a union pattern then this
method should return an array of patterns which
describe the union pattern, which should contain more than one pattern.
|
protected void |
handleJaxenException(org.jaxen.JaxenException e) |
boolean |
matches(Node node)
matches returns true if the given node matches
the filter condition. |
void |
setVariableContext(org.jaxen.VariableContext variableContext) |
String |
toString() |
private org.jaxen.pattern.Pattern pattern
private org.jaxen.Context context
public XPathPattern(org.jaxen.pattern.Pattern pattern)
public XPathPattern(String text)
public boolean matches(Node node)
NodeFilter
matches
returns true if the given node matches
the filter condition.
matches
in interface NodeFilter
matches
in interface Pattern
public double getPriority()
Pattern
getPriority
in interface Pattern
public Pattern[] getUnionPatterns()
Pattern
getUnionPatterns
in interface Pattern
public short getMatchType()
getMatchType
in interface Pattern
public String getMatchesNodeName()
Pattern
getMatchesNodeName
in interface Pattern
public void setVariableContext(org.jaxen.VariableContext variableContext)
protected org.jaxen.ContextSupport getContextSupport()
protected void handleJaxenException(org.jaxen.JaxenException e) throws XPathException
XPathException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses