org.basex.query.path
Class NodeTest

java.lang.Object
  extended by org.basex.query.path.Test
      extended by org.basex.query.path.NodeTest

public class NodeTest
extends Test

Extended node test.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.path.Test
Test.Mode
 
Field Summary
 
Fields inherited from class org.basex.query.path.Test
ATT, COM, DOC, ELM, mode, name, NOD, NSP, PI, TXT, type
 
Constructor Summary
NodeTest(NodeType nt, QNm nm)
          Constructor.
NodeTest(NodeType nt, QNm nm, Type et, boolean st)
          Constructor.
NodeTest(QNm nm)
          Convenience constructor for element tests.
 
Method Summary
 Test copy()
          Copies this test.
 boolean eq(ANode node)
          Tests if the test yields true.
 Test intersect(Test other)
          Computes the intersection between two tests.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.path.Test
compile, eq, get, nsSensitive, sameAs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeTest

public NodeTest(QNm nm)
Convenience constructor for element tests.

Parameters:
nm - node name

NodeTest

public NodeTest(NodeType nt,
                QNm nm)
Constructor.

Parameters:
nt - node type
nm - optional node name

NodeTest

public NodeTest(NodeType nt,
                QNm nm,
                Type et,
                boolean st)
Constructor.

Parameters:
nt - node type
nm - optional node name
et - extended node type
st - strip flag; only relevant if specified type is xs:untyped
Method Detail

copy

public Test copy()
Description copied from class: Test
Copies this test.

Specified by:
copy in class Test
Returns:
deep copy

eq

public boolean eq(ANode node)
Description copied from class: Test
Tests if the test yields true.

Specified by:
eq in class Test
Parameters:
node - node to be checked
Returns:
result of check

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

intersect

public Test intersect(Test other)
Description copied from class: Test
Computes the intersection between two tests.

Specified by:
intersect in class Test
Parameters:
other - other test
Returns:
intersection if it exists, null otherwise