ch.ethz.mxquery.iterators.forseq
Class ForseqWindowIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.model.TokenBasedIterator
ch.ethz.mxquery.iterators.forseq.ForseqIterator
ch.ethz.mxquery.iterators.forseq.ForseqWindowIterator
- All Implemented Interfaces:
- XDMIterator, Traversable
- Direct Known Subclasses:
- ForseqWindowEarlyBinding, ForseqWindowEarlyBindingParallel, ForseqWindowIndexIterator, ForseqWindowNaiveIterator
public abstract class ForseqWindowIterator
- extends ForseqIterator
Basic helper class for all windows. As every window implementation has some stuff in common,
this class was introduced
|
Constructor Summary |
ForseqWindowIterator(Context ctx,
int windowType,
QName var,
TypeInfo type,
XDMIterator seq,
WindowVariable[] startVars,
XDMIterator startExpr,
WindowVariable[] endVars,
XDMIterator endExpr,
boolean forceEnd,
boolean onNewStart,
int orderMode,
QueryLocation location)
Creates a new Window Iterator |
| Methods inherited from class ch.ethz.mxquery.model.Iterator |
addPredicates, close, copyInts, copyIterators, copyQNames, copyStrings, copyTypeInfos, 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 |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForseqWindowIterator
public ForseqWindowIterator(Context ctx,
int windowType,
QName var,
TypeInfo type,
XDMIterator seq,
WindowVariable[] startVars,
XDMIterator startExpr,
WindowVariable[] endVars,
XDMIterator endExpr,
boolean forceEnd,
boolean onNewStart,
int orderMode,
QueryLocation location)
throws MXQueryException
- Creates a new Window Iterator
- Parameters:
windowType - Type of the windowvar - Variable QNametype - Type of the variable (not supported at the moment)seq - The source iteratorstartVars - List of all start WindowVariablesstartExpr - The start expression iteratorendVars - List of all end WindowVariablesendExpr - The end expression iteratorforceEnd - If a force of the end should be appliedonNewStart - If the end expressions is newstartorderMode - Order mode of the iterator
- Throws:
MXQueryException
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 assignrecursive - 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
getAllSubIters
public XDMIterator[] getAllSubIters()
- Specified by:
getAllSubIters in interface XDMIterator- Overrides:
getAllSubIters in class Iterator
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
getInnermostContext
public Context getInnermostContext()
updateVarHolders
public void updateVarHolders(XQDynamicContext ctx)
throws MXQueryException
- Set the variable holder using this context
Access is public, since for parallel execution each new binding goes into new varHolders
- Parameters:
ctx - Context from which to resolve the variables into varHolders
- Throws:
MXQueryException
getForseqVars
public QName[] getForseqVars()
- Get the name of all variables (possibly) bound by this Forseq window iterator instance
- Returns:
- a sequence of variable names
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich