Qizx/open API

net.axyana.qizxopen.dm
Interface NodeTest

All Known Implementing Classes:
BaseNodeTest, DocumentTest, UnionNodeTest

public interface NodeTest

Test of a node on behalf of path-steps or type matching.


Method Summary
 boolean accepts(int kind, QName name)
          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).
 

Method Detail

accepts

public boolean accepts(int kind,
                       QName name)
Optimized test method. Can be used if only the node-kind and its name are necessary. This condition can be tested with method needsNode().

Returns:
true if node matched. A null name is always accepted.

accepts

public boolean accepts(Node node)
Generic test method.

Returns:
true if node matched. Used for extended tests like DocumentTest.

needsNode

public boolean needsNode()
Tells whether more information than the node kind and its name are necessary to perform the test.

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.

getNodeKind

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


staticallyCheckable

public boolean staticallyCheckable()
Returns true for simple node test (node kind only).


© 2005 Axyana Software