MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.iterators
Class GroupByIndexIterator

java.lang.Object
  extended by ch.ethz.mxquery.model.Iterator
      extended by ch.ethz.mxquery.iterators.GroupByIndexIterator
All Implemented Interfaces:
XDMIterator, Traversable

public final class GroupByIndexIterator
extends Iterator


Field Summary
 
Fields inherited from interface ch.ethz.mxquery.model.XDMIterator
EXPR_CATEGORY_SEQUENTIAL, EXPR_CATEGORY_SIMPLE, EXPR_CATEGORY_UPDATING, EXPR_CATEGORY_VACUOUS, EXPR_PARAM_CHEAPEVAL, EXPR_PARAM_VARIABLE, EXPR_PARAM_WINDOW, EXPR_PARAM_XDMGEN
 
Constructor Summary
GroupByIndexIterator(Context ctx, FFLWORIterator flwor, QName sourceQName, QName targetQName, XDMIterator[] bySources, QName[] byTargets, XDMIterator[] lets, XDMIterator where, QueryLocation location)
          Creates a new group by iterator which applies an index for the values to group for
GroupByIndexIterator(Context ctx, QName sourceQName, QName targetQName, XDMIterator[] bySources, QName[] byTargets, XDMIterator[] lets, XDMIterator where, QueryLocation location)
           
 
Method Summary
 void init()
          The complete grouping according to values is done during the init.
 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 setContext(Context context, boolean recursive)
          Assigns a context for this iterator (and possibly for its subIterators), replacing the existing context
 void setFLWOR(FFLWORIterator flwor)
           
 void setResettable(boolean r)
          Set this Iterator (and its subiterators) resetable.
 
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, setLoc, setOrderByExpr, setParam, setReturnExpr, setSubIters, setSubIters, setSubIters, setWhereExpr, traverse, traverseIteratorTree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupByIndexIterator

public GroupByIndexIterator(Context ctx,
                            QName sourceQName,
                            QName targetQName,
                            XDMIterator[] bySources,
                            QName[] byTargets,
                            XDMIterator[] lets,
                            XDMIterator where,
                            QueryLocation location)
                     throws MXQueryException
Throws:
MXQueryException

GroupByIndexIterator

public GroupByIndexIterator(Context ctx,
                            FFLWORIterator flwor,
                            QName sourceQName,
                            QName targetQName,
                            XDMIterator[] bySources,
                            QName[] byTargets,
                            XDMIterator[] lets,
                            XDMIterator where,
                            QueryLocation location)
                     throws MXQueryException
Creates a new group by iterator which applies an index for the values to group for

Parameters:
flwor -
sourceQName -
targetQName -
bySources -
byTargets -
lets -
where -
Throws:
MXQueryException
Method Detail

setFLWOR

public void setFLWOR(FFLWORIterator flwor)

setContext

public void setContext(Context context,
                       boolean recursive)
                throws MXQueryException
Description copied from interface: XDMIterator
Assigns a context for this iterator (and possibly for its subIterators), replacing the existing context

Specified by:
setContext in interface XDMIterator
Overrides:
setContext in class Iterator
Parameters:
context - the context to assign
recursive - true perform the assignment also subiteratos, false only replace on the current iterator
Throws:
MXQueryException

setResettable

public void setResettable(boolean r)
                   throws MXQueryException
Description copied from interface: XDMIterator
Set this Iterator (and its subiterators) resetable. Resetable iterators may require more space (trading buffered data against recomputation)

Specified by:
setResettable in interface XDMIterator
Overrides:
setResettable in class Iterator
Parameters:
r - true make this iterator resetable, false make it not resetable
Throws:
MXQueryException

init

public void init()
          throws MXQueryException
The complete grouping according to values is done during the init.

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

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich