jd.xml.xpath.axis
Class NodeTest

java.lang.Object
  extended byjd.xml.xpath.axis.NodeTest
Direct Known Subclasses:
NodeNameTest, NodeTestUnion, NodeTypeTest

public abstract class NodeTest
extends Object

A base class for node tests.


Field Summary
static int EXACT
           
static int NO
           
static int WILDCARD
           
 
Constructor Summary
NodeTest()
           
 
Method Summary
abstract  void accept(NodeTestVisitor visitor)
          Accept a NodeTestVisitor.
abstract  boolean accept(XPathNode node, int principalType)
          Test if a node is accepted by this NodeTest.
abstract  double calculatePriority()
          Calculate the priority of this node test.
abstract  int matchNames()
          Return how the NodeTest accepts regarding their names.
abstract  String toString()
          Return a string representation of the NodeTest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO

public static final int NO
See Also:
Constant Field Values

WILDCARD

public static final int WILDCARD
See Also:
Constant Field Values

EXACT

public static final int EXACT
See Also:
Constant Field Values
Constructor Detail

NodeTest

public NodeTest()
Method Detail

accept

public abstract boolean accept(XPathNode node,
                               int principalType)
Test if a node is accepted by this NodeTest.

Parameters:
node - the tested node
principalType - the principal node type as determined by the associated axis

calculatePriority

public abstract double calculatePriority()
Calculate the priority of this node test. Actually this is a contribution to the calculation of the default priority of an XSLT step pattern.


matchNames

public abstract int matchNames()
Return how the NodeTest accepts regarding their names.

See Also:
NO, WILDCARD, EXACT

accept

public abstract void accept(NodeTestVisitor visitor)
Accept a NodeTestVisitor.


toString

public abstract String toString()
Return a string representation of the NodeTest.