MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.iterators.forseq
Class ForseqIterator

java.lang.Object
  extended by ch.ethz.mxquery.model.Iterator
      extended by ch.ethz.mxquery.model.TokenBasedIterator
          extended by 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


Field Summary
static int GENERAL_WINDOW
           
static int LANDMARK_WINDOW
           
static int ORDER_MODE_END
           
static int ORDER_MODE_ENDSTART
           
static int ORDER_MODE_NONE
           
static int SLIDING_WINDOW
           
static int TUMBLING_WINDOW
           
 
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
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
 
Method Summary
 XDMIterator copy(Context parentIterContext, XQStaticContext newParentIterContext, boolean copyContext, java.util.Vector nestedPredCtxStack)
          Copies the Iterator.
 QName getForseqVariable()
          Returns the QName of the forseq variable
 boolean isParallelAccess()
           
 Token next()
          A skeleton for next.
 void setParallelAccess(boolean parallelAccess)
           
 
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
 

Field Detail

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
Constructor Detail

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 -
Method Detail

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 context
newParentIterContext - The previous context of the parent iterator
copyContext - Copy the context or use the parent context
nestedPredCtxStack - 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

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich