net.xfra.qizxopen.xquery.dm
Class DocumentTest
java.lang.Object
|
+--net.xfra.qizxopen.xquery.dm.DocumentTest
- All Implemented Interfaces:
- NodeTest
- public class DocumentTest
- extends java.lang.Object
- implements NodeTest
Represents the node test document-node().
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
topTest
public NodeTest topTest
DocumentTest
public DocumentTest(NodeTest topTest)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getNodeKind
public int getNodeKind()
- Description copied from interface:
NodeTest
- Returns the node kind (Node.ELEMENT, Node.TEXT etc) or -1 if not simple.
- Specified by:
getNodeKind
in interface NodeTest
staticallyCheckable
public boolean staticallyCheckable()
- Description copied from interface:
NodeTest
- Returns true for simple node test (node kind only).
- Specified by:
staticallyCheckable
in interface NodeTest
accepts
public boolean accepts(int nodeKind,
QName nodeName)
- Specified by:
accepts
in interface NodeTest
- Returns:
- true if node matched. A null name is always accepted.
needsNode
public boolean needsNode()
- Specified by:
needsNode
in interface NodeTest
- Returns:
- true if the node itself is necessary for checking (not only the kind
and name). Allows optimization (avoids building a Node just for testing).
Returns true for extended tests like DocumentTest.
accepts
public boolean accepts(Node node)
- Specified by:
accepts
in interface NodeTest
- Returns:
- true if node matched. Used for extended tests like DocumentTest.