Qizx/Open v0.3

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().


Field Summary
 NodeTest topTest
           
 
Constructor Summary
DocumentTest(NodeTest topTest)
           
 
Method Summary
 boolean accepts(int nodeKind, QName nodeName)
           
 boolean accepts(Node node)
           
 int getNodeKind()
          Returns the node kind (Node.ELEMENT, Node.TEXT etc) or -1 if not simple.
 boolean needsNode()
           
 boolean staticallyCheckable()
          Returns true for simple node test (node kind only).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topTest

public NodeTest topTest
Constructor Detail

DocumentTest

public DocumentTest(NodeTest topTest)
Method Detail

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.

 Copyright Xavier FRANC 2003-2004