org.basex.query.xquery.expr
Class Ord

java.lang.Object
  extended by org.basex.query.xquery.expr.Expr
      extended by org.basex.query.xquery.expr.Ord

public final class Ord
extends Expr

Single order specifier.

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
 
Constructor Summary
Ord()
          Empty constructor for stable sorting.
Ord(Expr e, boolean d, boolean l, Item c)
          Constructor.
 
Method Summary
 Ord comp(XQContext ctx)
          Optimizes and compiles the expression tree.
 Item eval(XQContext ctx)
          Evaluates the expression and returns the resulting item.
 void finish()
          Resets the built sequence.
 java.lang.String info()
          Returns a string description of the expression.
 Item item(int i)
          Returns the specified item.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xquery.expr.Expr
cls, d, e, i, n, node, s, size, str, u
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ord

public Ord()
Empty constructor for stable sorting.


Ord

public Ord(Expr e,
           boolean d,
           boolean l,
           Item c)
Constructor.

Parameters:
e - expression
d - descending order
l - least empty order
c - collation
Method Detail

comp

public Ord comp(XQContext ctx)
         throws XQException
Description copied from class: Expr
Optimizes and compiles the expression tree.

Specified by:
comp in class Expr
Parameters:
ctx - query context
Returns:
optimized Expression
Throws:
XQException - evaluation exception

eval

public Item eval(XQContext ctx)
          throws XQException
Description copied from class: Expr
Evaluates the expression and returns the resulting item.

Specified by:
eval in class Expr
Parameters:
ctx - query context
Returns:
resulting item
Throws:
XQException - evaluation exception

finish

public void finish()
Resets the built sequence.


info

public java.lang.String info()
Description copied from class: Expr
Returns a string description of the expression. Contrary to the Expr.toString() method, the current expressions aren't included in the output.

Specified by:
info in class Expr
Returns:
result of check

item

public Item item(int i)
Returns the specified item.

Parameters:
i - item index
Returns:
item

toString

public java.lang.String toString()
Specified by:
toString in class Expr