org.basex.query.xquery.expr
Class Ord

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

public final class Ord
extends java.lang.Object

Single order specifier.

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

Constructor Summary
Ord()
          Empty constructor for stable sorting.
Ord(Expr e, boolean d, boolean l)
          Constructor.
 
Method Summary
 void add(XQContext ctx)
          Adds an item to be sorted.
 void comp(XQContext ctx)
          Compiles the expression to be sorted.
 void finish()
          Resets the built sequence.
 Item item(int i)
          Returns the specified item.
 void plan(Serializer ser)
          Serializes the abstract syntax tree.
 java.lang.String toString()
           
 
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)
Constructor.

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

comp

public void comp(XQContext ctx)
          throws XQException
Compiles the expression to be sorted.

Parameters:
ctx - query context
Throws:
XQException - query exception

add

public void add(XQContext ctx)
         throws XQException
Adds an item to be sorted.

Parameters:
ctx - query context
Throws:
XQException - query exception

finish

public void finish()
Resets the built sequence.


item

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

Parameters:
i - item index
Returns:
item

toString

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

plan

public void plan(Serializer ser)
          throws java.io.IOException
Serializes the abstract syntax tree.

Parameters:
ser - serializer
Throws:
java.io.IOException - exception