Qizx/open API

net.axyana.qizxopen.xquery.dm
Class DocumentTest

java.lang.Object
  extended bynet.axyana.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)
          Optimized test method.
 boolean accepts(Node node)
          Generic test method.
 int getNodeKind()
          Returns the node kind (Node.ELEMENT, Node.TEXT etc) specifically matched, or -1 if several kinds can be matched.
 boolean needsNode()
          Tells whether more information than the node kind and its name are necessary to perform the test.
 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()

getNodeKind

public int getNodeKind()
Description copied from interface: NodeTest
Returns the node kind (Node.ELEMENT, Node.TEXT etc) specifically matched, or -1 if several kinds can be matched.

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)
Description copied from interface: NodeTest
Optimized test method. Can be used if only the node-kind and its name are necessary. This condition can be tested with method NodeTest.needsNode().

Specified by:
accepts in interface NodeTest
Returns:
true if node matched. A null name is always accepted.

needsNode

public boolean needsNode()
Description copied from interface: NodeTest
Tells whether more information than the node kind and its name are necessary to perform the test.

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)
Description copied from interface: NodeTest
Generic test method.

Specified by:
accepts in interface NodeTest
Returns:
true if node matched. Used for extended tests like DocumentTest.

© 2005 Axyana Software