ch.ethz.mxquery.iterators
Class OrderByIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.model.CurrentBasedIterator
ch.ethz.mxquery.iterators.OrderByIterator
- All Implemented Interfaces:
- XDMIterator, Traversable
public class OrderByIterator
- extends CurrentBasedIterator
Represents an order by expression of a flwor expression.
TODO Collation &
stable
Method Summary |
Token[] |
getCurrentKey()
Computes the key of the current context => Computes for every order by
expression a Token that contains the key value. |
Token |
next()
Produces the next XDM token
This method typically implements the base functionality of an Iterator and
computes the value of the next token. |
void |
setup(ch.ethz.mxquery.iterators.OrderByIterator.OrderElement[] orderElements)
Sorts the passed order elements. |
KXmlSerializer |
traverseIteratorTree(KXmlSerializer serializer)
|
Methods inherited from class ch.ethz.mxquery.model.Iterator |
addPredicates, close, copy, copyInts, copyIterators, copyQNames, copyStrings, copyTypeInfos, getAllSubIters, getAllSubItersRecursive, getContext, getExpressionCategoryType, getLoc, getPendingUpdateList, getPredicates, getStaticType, getSubIters, hasPredicates, isConstModePreserve, isExprParameter, isOpen, isResettable, removePredicates, reset, setConstModePreserve, setContext, setLoc, setOrderByExpr, setParam, setResettable, setReturnExpr, setSubIters, setSubIters, setSubIters, setWhereExpr, traverse |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderByIterator
public OrderByIterator(Context ctx,
XDMIterator[] orderIterators,
OrderOptions[] orderOptions,
boolean stable,
QueryLocation location)
throws MXQueryException
- Throws:
MXQueryException
getCurrentKey
public Token[] getCurrentKey()
throws MXQueryException
- Computes the key of the current context => Computes for every order by
expression a Token that contains the key value.
- Returns:
- the sequence of order keys
- Throws:
MXQueryException
setup
public void setup(ch.ethz.mxquery.iterators.OrderByIterator.OrderElement[] orderElements)
throws MXQueryException
- Sorts the passed order elements.
- Parameters:
orderElements
-
- Throws:
MXQueryException
next
public Token next()
throws MXQueryException
- Description copied from interface:
XDMIterator
- Produces the next XDM token
This method typically implements the base functionality of an Iterator and
computes the value of the next token.
- Returns:
- The XDM token representing the next fragment of the XDM instance
- Throws:
MXQueryException
traverseIteratorTree
public KXmlSerializer traverseIteratorTree(KXmlSerializer serializer)
throws java.lang.Exception
- Specified by:
traverseIteratorTree
in interface XDMIterator
- Overrides:
traverseIteratorTree
in class Iterator
- Throws:
java.lang.Exception
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich