org.basex.query.xquery.item
Class Node

java.lang.Object
  extended by org.basex.query.xquery.expr.Expr
      extended by org.basex.query.xquery.item.Item
          extended by org.basex.query.xquery.item.Node
Direct Known Subclasses:
DNode, FNode

public abstract class Node
extends Item

Node Type.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.query.xquery.expr.Expr
type
 
Method Summary
abstract  NodeIter anc()
          Returns an ancestor axis iterator.
abstract  NodeIter ancOrSelf()
          Returns an ancestor-or-self axis iterator.
abstract  NodeIter attr()
          Returns an attribute axis iterator.
 byte[] base()
          Returns the database name.
 boolean bool()
          Returns a boolean representation of the item.
abstract  NodeMore child()
          Returns a child axis iterator.
abstract  Node copy()
          Creates a new copy (clone) of the node.
 double dbl()
          Returns a double representation of the item.
abstract  NodeIter desc()
          Returns a descendant axis iterator.
abstract  NodeIter descOrSelf()
          Returns a descendant-or-self axis iterator.
 int diff(Item i)
          Returns the difference between the current and the specified item.
 int diff(Node nod)
          Compares two nodes for their unique order.
 boolean eq(Item i)
          Checks the items for equality.
 Node finish()
          Returns a final node representation.
 float flt()
          Returns a float representation of the item.
abstract  NodeIter foll()
          Returns a following axis iterator.
abstract  NodeIter follSibl()
          Returns a following-sibling axis iterator.
 boolean is(Node nod)
          Compares two nodes for equality.
 long itr()
          Returns a numeric (long) representation of the item.
 byte[] name()
          Returns the node name.
 boolean node()
          Checks if this is a node.
 FAttr[] ns()
          Returns a namespace array.
abstract  NodeIter par()
          Returns a parent axis iterator.
 Node parent()
          Returns the parent node.
 void parent(Node p)
          Sets the parent node.
abstract  NodeIter prec()
          Returns a preceding axis iterator.
abstract  NodeIter precSibl()
          Returns a preceding-sibling axis iterator.
 QNm qname()
          Returns the node name.
abstract  NodeIter self()
          Returns an self axis iterator.
 boolean u()
          Checks if this is an untyped item.
 
Methods inherited from class org.basex.query.xquery.item.Item
castErr, comp, eval, i, info, iter, serialize, serialize, size, toString
 
Methods inherited from class org.basex.query.xquery.expr.Expr
cls, d, e, n, s, str
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

anc

public abstract NodeIter anc()
Returns an ancestor axis iterator.

Returns:
iterator

ancOrSelf

public abstract NodeIter ancOrSelf()
Returns an ancestor-or-self axis iterator.

Returns:
iterator

attr

public abstract NodeIter attr()
Returns an attribute axis iterator.

Returns:
iterator

base

public byte[] base()
Returns the database name.

Returns:
database name

bool

public final boolean bool()
Description copied from class: Item
Returns a boolean representation of the item.

Overrides:
bool in class Item
Returns:
boolean value

child

public abstract NodeMore child()
Returns a child axis iterator.

Returns:
iterator

copy

public abstract Node copy()
                   throws XQException
Creates a new copy (clone) of the node.

Returns:
new copy
Throws:
XQException - evaluation exception

dbl

public final double dbl()
                 throws XQException
Description copied from class: Item
Returns a double representation of the item.

Overrides:
dbl in class Item
Returns:
double value
Throws:
XQException - evaluation exception

desc

public abstract NodeIter desc()
Returns a descendant axis iterator.

Returns:
iterator

descOrSelf

public abstract NodeIter descOrSelf()
Returns a descendant-or-self axis iterator.

Returns:
iterator

diff

public final int diff(Item i)
               throws XQException
Description copied from class: Item
Returns the difference between the current and the specified item.

Overrides:
diff in class Item
Parameters:
i - item to be compared.
Returns:
difference
Throws:
XQException - evaluation exception

diff

public int diff(Node nod)
Compares two nodes for their unique order.

Parameters:
nod - node to be compared
Returns:
result of check

eq

public final boolean eq(Item i)
                 throws XQException
Description copied from class: Item
Checks the items for equality.

Specified by:
eq in class Item
Parameters:
i - item to be compared.
Returns:
result of check
Throws:
XQException - evaluation exception

finish

public Node finish()
Returns a final node representation.

Returns:
node

flt

public final float flt()
                throws XQException
Description copied from class: Item
Returns a float representation of the item.

Overrides:
flt in class Item
Returns:
float value
Throws:
XQException - evaluation exception

foll

public abstract NodeIter foll()
Returns a following axis iterator.

Returns:
iterator

follSibl

public abstract NodeIter follSibl()
Returns a following-sibling axis iterator.

Returns:
iterator

is

public boolean is(Node nod)
Compares two nodes for equality.

Parameters:
nod - node to be compared
Returns:
result of check

itr

public final long itr()
               throws XQException
Description copied from class: Item
Returns a numeric (long) representation of the item.

Overrides:
itr in class Item
Returns:
long value
Throws:
XQException - evaluation exception

name

public byte[] name()
Returns the node name.

Returns:
name

node

public final boolean node()
Description copied from class: Expr
Checks if this is a node.

Overrides:
node in class Expr
Returns:
result of check

ns

public FAttr[] ns()
Returns a namespace array.

Returns:
namespace array

par

public abstract NodeIter par()
Returns a parent axis iterator.

Returns:
iterator

parent

public Node parent()
Returns the parent node.

Returns:
parent node

parent

public void parent(Node p)
Sets the parent node.

Parameters:
p - parent node

prec

public abstract NodeIter prec()
Returns a preceding axis iterator.

Returns:
iterator

precSibl

public abstract NodeIter precSibl()
Returns a preceding-sibling axis iterator.

Returns:
iterator

qname

public QNm qname()
Returns the node name.

Returns:
name

self

public abstract NodeIter self()
Returns an self axis iterator.

Returns:
iterator

u

public final boolean u()
Description copied from class: Expr
Checks if this is an untyped item.

Overrides:
u in class Expr
Returns:
result of check