Package org.basex.query.expr.path
Class Test
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.path.Test
Abstract node test.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract Testcopy()Copies this test.static TestCreates a single test with the same node type.static TestReturns a node test, a name test ornull.static TestReturns a node test, a name test ornull.booleaninstanceOf(Test test) Checks if the current test is an instance of the specified test.abstract TestComputes the intersection between two tests.final booleanChecks if the specified item matches the test.abstract booleanChecks if the specified node matches the test.booleanChecks if evaluation can be dropped.voidCreates a query plan.final voidplan(QueryString qs) Creates a query string.abstract StringtoString(boolean full) Returns a string representation of this test.Methods inherited from class org.basex.query.expr.ExprInfo
description, toErrorString, toString
-
Field Details
-
type
Node type.
-
-
Method Details
-
get
Returns a node test, a name test ornull.- Parameters:
type- node type (element, attribute, processing instruction)name- node name- Returns:
- test or
null
-
get
Returns a node test, a name test ornull.- Parameters:
type- node type (element, attribute, processing instruction)name- node name (can benull)ann- type annotation (can benull)ns- default element namespace (can benull)- Returns:
- test or
null
-
get
Creates a single test with the same node type.- Parameters:
tests- tests to be merged (can containnullreferences)- Returns:
- single test, union test, or
nullif test cannot be created.
-
noMatches
Checks if evaluation can be dropped.- Parameters:
data- data reference (can benull)- Returns:
- result of check
-
matches
Checks if the specified node matches the test.- Parameters:
node- node to be checked- Returns:
- result of check
-
matches
Checks if the specified item matches the test.- Parameters:
item- item to be checked- Returns:
- result of check
-
copy
Copies this test.- Returns:
- deep copy
-
instanceOf
Checks if the current test is an instance of the specified test.- Parameters:
test- test to be checked- Returns:
- result of check
-
intersect
Computes the intersection between two tests.- Parameters:
test- other test- Returns:
- intersection if it exists,
nullotherwise
-
toString
Returns a string representation of this test.- Parameters:
full- include node type- Returns:
- string
-
plan
Description copied from class:ExprInfoCreates a query plan. -
plan
Description copied from class:ExprInfoCreates a query string.
-