Package org.basex.query.value.node
Class DBNode
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.item.Item
org.basex.query.value.node.ANode
org.basex.query.value.node.DBNode
Database node.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, specifying a parser reference.Constructor, creating a document node from the specified data reference.Constructor, creating a node from the specified data reference.Constructor, specifying full node information.Constructor, specifying an XML input reference. -
Method Summary
Modifier and TypeMethodDescriptionfinal BasicNodeIterReturns a light-weight, low-level ancestor axis iterator.final BasicNodeIterReturns a light-weight ancestor-or-self axis iterator.final BasicNodeIterReturns a light-weight, low-level attribute axis iterator withIter.size()andIter.get(long)implemented.final byte[]baseURI()Returns the base URI of the node.final BasicNodeIterReturns a light-weight, low-level child axis iterator.final Valuecopy(CompileContext cc, IntObjMap<Var> vm) Copies an expression.final Datadata()Returns the data reference bound to this expression.final doubleReturns a double representation of the value.final BasicNodeIterReturns a light-weight, low-level descendant axis iterator.final BasicNodeIterReturns a light-weight, low-level descendant-or-self axis iterator.final intChecks the document order of two nodes.final booleanThis function is e.g.final DBNodefinish()Returns a finalized node instance.final BasicNodeIterReturns a light-weight, low-level following axis iterator.final BasicNodeIterReturns a light-weight, low-level following-sibling axis iterator.final booleanIndicates if the node has children.final inthashCode()final booleanChecks if two nodes are identical.final longReturns an integer (long) representation of the value.final DBNodematerialize(QueryContext qc, boolean copy) Returns a materialized, context-independent version of this item.final byte[]name()Returns the name (optional prefix, local name) of an attribute, element or processing instruction.final AttsReturns all namespaces defined for the nodes.final ANodeparent()Returns the parent node.final voidSets the parent node.final voidCreates a query plan.voidplan(QueryString qs) Creates a query string.final intpre()Returns the pre value.final voidpre(int p) Assigns a pre value.final QNmqname()Returns the QName (optional prefix, local name) of an attribute, element or processing instruction.final byte[]string()Returns the string value.Returns a string representation of the expression that can be embedded in error messages.final BXNodetoJava()Returns a Java representation of the value.final Type.IDtypeId()Returns a type id.final byte[]xdmInfo()Returns data model info.Methods inherited from class org.basex.query.value.node.ANode
atomItem, atomItem, atomValue, attribute, attribute, bool, comparable, copy, copy, ddo, diff, eq, kind, kind, nodeType, nsScope, optimize, parentIter, precedingIter, precedingSiblingIter, root, sameKey, selfIter, string, type, uriMethods inherited from class org.basex.query.value.item.Item
atomSize, cache, dec, description, ebv, equiv, flt, hash, input, instanceOf, item, itemAt, iter, persistent, refineType, reverse, score, seqType, size, subsequence, testMethods inherited from class org.basex.query.value.Value
accept, checkUp, compile, count, exprSize, has, inline, inlineable, isEmpty, isItem, iter, iterator, materialize, serialize, serialize, serialize, valueMethods inherited from class org.basex.query.expr.Expr
arg, args, atomIter, data, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimize, simplifyFor, typeCheck, uses, vacuous, visitAllMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DBNode
Constructor, creating a document node from the specified data reference.- Parameters:
data- data reference
-
DBNode
Constructor, creating a node from the specified data reference.- Parameters:
data- data referencepre- pre value
-
DBNode
Constructor, specifying full node information.- Parameters:
data- data referencepre- pre valuekind- node kind
-
DBNode
Constructor, specifying an XML input reference.- Parameters:
input- input reference- Throws:
IOException- I/O exception
-
DBNode
Constructor, specifying a parser reference.- Parameters:
parser- parser- Throws:
IOException- I/O exception
-
-
Method Details
-
data
Description copied from class:Expr -
pre
public final void pre(int p) Assigns a pre value.- Parameters:
p- pre value
-
pre
public final int pre()Returns the pre value.- Returns:
- pre value
-
string
public final byte[] string()Description copied from class:ANodeReturns the string value. -
itr
Description copied from class:ItemReturns an integer (long) representation of the value.- Overrides:
itrin classItem- Parameters:
ii- input info (can benull)- Returns:
- long value
- Throws:
QueryException- query exception
-
dbl
Description copied from class:ItemReturns a double representation of the value.- Overrides:
dblin classItem- Parameters:
ii- input info (can benull)- Returns:
- double value
- Throws:
QueryException- query exception
-
name
public final byte[] name()Description copied from class:ANodeReturns the name (optional prefix, local name) of an attribute, element or processing instruction. This function is possibly evaluated faster thanANode.qname(), as noQNminstance may need to be created. -
qname
Description copied from class:ANodeReturns the QName (optional prefix, local name) of an attribute, element or processing instruction. -
namespaces
Description copied from class:ANode- Overrides:
namespacesin classANode- Returns:
- namespace array or
null
-
baseURI
public final byte[] baseURI()Description copied from class:ANodeReturns the base URI of the node. -
is
Description copied from class:ANodeChecks if two nodes are identical. -
diff
Description copied from class:ANodeChecks the document order of two nodes. -
copy
Description copied from class:ExprCopies an expression. Used for inlining functions, or for copying static queries. It is utilized byVarRef.inline(org.basex.query.InlineContext),FuncItem.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext),Closure.inline(org.basex.query.InlineContext)andStaticFunc.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext).- Overrides:
copyin classValue- Parameters:
cc- compilation contextvm- mapping from old variable IDs to new variable copies. Required byClosure.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)andVarRef.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)- Returns:
- copied expression
-
materialize
Description copied from class:ItemReturns a materialized, context-independent version of this item.- Specified by:
materializein classANode- Parameters:
qc- query context (ifnull, process cannot be interrupted)copy- create full copy- Returns:
- item copy, or
null) if the item cannot be materialized
-
finish
Description copied from class:ANodeReturns a finalized node instance. This method is called when iterating through node results: If a single node instances is recycled, it needs to be duplicated in the final step. -
parent
Description copied from class:ANodeReturns the parent node. -
parent
Description copied from class:ANodeSets the parent node. -
hasChildren
public final boolean hasChildren()Description copied from class:ANodeIndicates if the node has children.- Specified by:
hasChildrenin classANode- Returns:
- result of test
-
ancestorIter
Description copied from class:ANodeReturns a light-weight, low-level ancestor axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish(). Overwritten byancestorIter().- Overrides:
ancestorIterin classANode- Returns:
- iterator
-
ancestorOrSelfIter
Description copied from class:ANodeReturns a light-weight ancestor-or-self axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish(). Overwritten byancestorOrSelfIter().- Overrides:
ancestorOrSelfIterin classANode- Returns:
- iterator
-
attributeIter
Description copied from class:ANodeReturns a light-weight, low-level attribute axis iterator withIter.size()andIter.get(long)implemented. Before nodes are added to the result, they must be finalized viaANode.finish().- Specified by:
attributeIterin classANode- Returns:
- iterator
-
childIter
Description copied from class:ANodeReturns a light-weight, low-level child axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish(). -
descendantIter
Description copied from class:ANodeReturns a light-weight, low-level descendant axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish().- Specified by:
descendantIterin classANode- Returns:
- iterator
-
descendantOrSelfIter
Description copied from class:ANodeReturns a light-weight, low-level descendant-or-self axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish().- Specified by:
descendantOrSelfIterin classANode- Returns:
- iterator
-
followingIter
Description copied from class:ANodeReturns a light-weight, low-level following axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish().- Overrides:
followingIterin classANode- Returns:
- iterator
-
followingSiblingIter
Description copied from class:ANodeReturns a light-weight, low-level following-sibling axis iterator. Before nodes are added to the result, they must be finalized viaANode.finish().- Overrides:
followingSiblingIterin classANode- Returns:
- iterator
-
xdmInfo
public final byte[] xdmInfo()Description copied from class:Item -
typeId
Description copied from class:Item -
toJava
Description copied from class:ValueReturns a Java representation of the value. -
hashCode
public final int hashCode() -
equals
Description copied from class:ExprThis function is e.g. called by:If.optimize(CompileContext),Switch.optimize(CompileContext),Typeswitch.optimize(CompileContext), in order to discard identical expressions.CmpR.mergeEbv(Expr, boolean, CompileContext)orCmpSR.mergeEbv(Expr, boolean, CompileContext), in order to merge expressions with identical input.CmpG.optimize(CompileContext)orCmpV.optimize(CompileContext), in order to pre-evaluate equality tests.CmpG.optimize(CompileContext)orPos.get(Expr, CmpV.OpV, InputInfo, CompileContext), in order to compare the start and end value.PathCache, in order to find identical root values at runtime.
-
plan
Description copied from class:ExprInfoCreates a query plan. -
toErrorString
Description copied from class:ExprInfoReturns a string representation of the expression that can be embedded in error messages. Defaults toExprInfo.toString().- Overrides:
toErrorStringin classExprInfo- Returns:
- class name
-
plan
Description copied from class:ExprInfoCreates a query string.
-