ch.ethz.mxquery.iterators.forseq
Class ForseqIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.model.TokenBasedIterator
ch.ethz.mxquery.iterators.forseq.ForseqIterator
- All Implemented Interfaces:
- XDMIterator, Traversable
- Direct Known Subclasses:
- ForseqGeneralIterator, ForseqWindowIterator
public abstract class ForseqIterator
- extends TokenBasedIterator
The main abstract class for FORSEQ.
It basically contains a collection of helper methods
Methods inherited from class ch.ethz.mxquery.model.Iterator |
addPredicates, close, 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, traverseIteratorTree |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GENERAL_WINDOW
public static final int GENERAL_WINDOW
- See Also:
- Constant Field Values
TUMBLING_WINDOW
public static final int TUMBLING_WINDOW
- See Also:
- Constant Field Values
SLIDING_WINDOW
public static final int SLIDING_WINDOW
- See Also:
- Constant Field Values
LANDMARK_WINDOW
public static final int LANDMARK_WINDOW
- See Also:
- Constant Field Values
ORDER_MODE_NONE
public static final int ORDER_MODE_NONE
- See Also:
- Constant Field Values
ORDER_MODE_END
public static final int ORDER_MODE_END
- See Also:
- Constant Field Values
ORDER_MODE_ENDSTART
public static final int ORDER_MODE_ENDSTART
- See Also:
- Constant Field Values
ForseqIterator
public ForseqIterator(Context ctx,
int windowType,
QName var,
TypeInfo t,
XDMIterator seq,
int orderMode,
QueryLocation location)
- Every FORSEQ (Window and General) has those properties in common
- Parameters:
windowType
- var
- t
- seq
-
next
public Token next()
throws MXQueryException
- A skeleton for next. It takes care, that init is called and that the windows are destroyed for
the garbage collection
- Specified by:
next
in interface XDMIterator
- Overrides:
next
in class TokenBasedIterator
- Returns:
- The first call will give the type of first Token of the result, the second the second and so on.
When the last token has been produced, the type of an END_SEQUENCE token will be returned
- Throws:
MXQueryException
getForseqVariable
public QName getForseqVariable()
- Returns the QName of the forseq variable
- Returns:
- The QName of the forseq variable
copy
public final XDMIterator copy(Context parentIterContext,
XQStaticContext newParentIterContext,
boolean copyContext,
java.util.Vector nestedPredCtxStack)
throws MXQueryException
- Description copied from interface:
XDMIterator
- Copies the Iterator.
The context is copied (if necessary) here.
The subIterators are copied (if existing) here.
- Specified by:
copy
in interface XDMIterator
- Overrides:
copy
in class Iterator
- Parameters:
parentIterContext
- The new parent contextnewParentIterContext
- The previous context of the parent iteratorcopyContext
- Copy the context or use the parent contextnestedPredCtxStack
- The Stack of nested predicate context, needed for nested rewritten predicates
- Returns:
- A copy of this Iterator
- Throws:
MXQueryException
isParallelAccess
public boolean isParallelAccess()
setParallelAccess
public void setParallelAccess(boolean parallelAccess)
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich