jd.xml.xpath.axis
Class NodeTypeTest

java.lang.Object
  extended byjd.xml.xpath.axis.NodeTest
      extended byjd.xml.xpath.axis.NodeTypeTest
Direct Known Subclasses:
AllNodeTypeTest, NodeTypeAllTest, PiNodeTypeTest, SingleNodeTypeTest

public abstract class NodeTypeTest
extends NodeTest

A NodeTest to filter nodes with certain types.


Field Summary
static NodeTypeTest ALL
          The NodeTypeTest "*".
static NodeTypeTest COMMENT
          The NodeTypeTest "comment()".
static String NAME_ALL
           
static String NAME_COMMENT
           
static String NAME_PI
           
static String NAME_TEXT
           
static NodeTypeTest PI
          The NodeTypeTest "processing-instruction()".
static NodeTypeTest TEXT
          The NodeTypeTest "text()".
 
Fields inherited from class jd.xml.xpath.axis.NodeTest
EXACT, NO, WILDCARD
 
Constructor Summary
NodeTypeTest()
           
 
Method Summary
abstract  boolean accept(int nodeType)
          Return if the node-type test accepts the given node-type.
static NodeTypeTest getTest(String name, String parameter)
          Create a NodeTypeTest.
 int matchNames()
          Return NO.
 
Methods inherited from class jd.xml.xpath.axis.NodeTest
accept, accept, calculatePriority, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ALL

public static final String NAME_ALL
See Also:
Constant Field Values

NAME_TEXT

public static final String NAME_TEXT
See Also:
Constant Field Values

NAME_COMMENT

public static final String NAME_COMMENT
See Also:
Constant Field Values

NAME_PI

public static final String NAME_PI
See Also:
Constant Field Values

ALL

public static final NodeTypeTest ALL
The NodeTypeTest "*".


TEXT

public static final NodeTypeTest TEXT
The NodeTypeTest "text()".


COMMENT

public static final NodeTypeTest COMMENT
The NodeTypeTest "comment()".


PI

public static final NodeTypeTest PI
The NodeTypeTest "processing-instruction()".

Constructor Detail

NodeTypeTest

public NodeTypeTest()
Method Detail

accept

public abstract boolean accept(int nodeType)
Return if the node-type test accepts the given node-type.


matchNames

public final int matchNames()
Return NO.

Specified by:
matchNames in class NodeTest
See Also:
NodeTest.NO, NodeTest.WILDCARD, NodeTest.EXACT

getTest

public static NodeTypeTest getTest(String name,
                                   String parameter)
Create a NodeTypeTest.

Parameters:
name - the test name
parameter - an optional parameter