|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XDMIterator
The interface of all iterators producing XDM and/or PUL The computation of XDM/PUL is done lazily, whenever possible Iterators form a tree structure, representing the XQuery expressions
Field Summary | |
---|---|
static int |
EXPR_CATEGORY_SEQUENTIAL
|
static int |
EXPR_CATEGORY_SIMPLE
|
static int |
EXPR_CATEGORY_UPDATING
|
static int |
EXPR_CATEGORY_VACUOUS
|
static int |
EXPR_PARAM_CHEAPEVAL
|
static int |
EXPR_PARAM_VARIABLE
|
static int |
EXPR_PARAM_WINDOW
|
static int |
EXPR_PARAM_XDMGEN
|
Method Summary | |
---|---|
void |
close(boolean restartable)
Frees the state of the iterator and all subiterators. |
XDMIterator |
copy(Context parentIterContext,
XQStaticContext prevParentIterContext,
boolean copyContext,
java.util.Vector nestedPredCtxStack)
Copies the Iterator. |
XDMIterator[] |
getAllSubIters()
|
java.util.Vector |
getAllSubItersRecursive()
|
Context |
getContext()
Retrieve the (unified) context of this iterators, carrying both dynamic and static information |
int |
getExpressionCategoryType(boolean scripting)
Get and (check) the expression category type, as defined in the XQSF draft Expression categories are: SIMPLE, UPDATING, SEQUENTIAL, VACUOUS If the categories are incompatible, the related exception is thrown The check is only done when requested by calling this function The implementation covers the common case (simple expressions, no checking) and needs to be overwritten for checking and also by updating, sequential and vacuous expressions |
QueryLocation |
getLoc()
Get the location in the XQuery source where this operator comes from |
PendingUpdateList |
getPendingUpdateList()
Returns the complete Pending Update List (PUL) of this iterator. |
TypeInfo |
getStaticType()
Return the return type if it can be statically determined |
XDMIterator[] |
getSubIters()
|
boolean |
isConstModePreserve()
|
boolean |
isExprParameter(int valueToCheck,
boolean recursive)
Optimization check |
boolean |
isOpen()
|
boolean |
isResettable()
Retrieve if this iterator is resetable |
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 |
reset()
Resets the Iterator to its original state, without discarding expensive state |
void |
setConstModePreserve(boolean constModePreserve)
|
void |
setContext(Context context,
boolean recursive)
Assigns a context for this iterator (and possibly for its subIterators), replacing the existing context |
void |
setLoc(QueryLocation loc)
Set the location in the XQuery source where this operator comes from |
void |
setResettable(boolean r)
Set this Iterator (and its subiterators) resetable. |
void |
setSubIters(XDMIterator subIt)
|
void |
setSubIters(XDMIterator[] subIt)
|
KXmlSerializer |
traverseIteratorTree(KXmlSerializer serializer)
|
Methods inherited from interface ch.ethz.mxquery.util.Traversable |
---|
traverse |
Field Detail |
---|
static final int EXPR_CATEGORY_SIMPLE
static final int EXPR_CATEGORY_UPDATING
static final int EXPR_CATEGORY_SEQUENTIAL
static final int EXPR_CATEGORY_VACUOUS
static final int EXPR_PARAM_VARIABLE
static final int EXPR_PARAM_WINDOW
static final int EXPR_PARAM_CHEAPEVAL
static final int EXPR_PARAM_XDMGEN
Method Detail |
---|
Token next() throws MXQueryException
If
- any error occurs during the computation of this token
MXQueryException
void reset() throws MXQueryException
MXQueryException
void close(boolean restartable) throws MXQueryException
restartable
- make the iterator restartable (otherwise the iterator will stay closed with additional next calls)
MXQueryException
PendingUpdateList getPendingUpdateList() throws MXQueryException
null
for non-updating expressions. Since the PUL is computed gradually (especially in a scripting environment, this function should only be called when the evaluation is complete.
For scripting, this function also merges the PULs of the child iterators, so
MXQueryException
TypeInfo getStaticType()
int getExpressionCategoryType(boolean scripting) throws MXQueryException
scripting
- TODO
MXQueryException:
- if the categories are incompatible, raise the related exception
MXQueryException
XDMIterator copy(Context parentIterContext, XQStaticContext prevParentIterContext, boolean copyContext, java.util.Vector nestedPredCtxStack) throws MXQueryException
parentIterContext
- The new parent contextprevParentIterContext
- 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
MXQueryException
void setResettable(boolean r) throws MXQueryException
r
- true make this iterator resetable, false make it not resetable
MXQueryException
boolean isResettable() throws MXQueryException
MXQueryException
Context getContext()
void setContext(Context context, boolean recursive) throws MXQueryException
context
- the context to assignrecursive
- true perform the assignment also subiteratos, false only replace on the current iterator
MXQueryException
QueryLocation getLoc()
void setLoc(QueryLocation loc)
loc
- the QueryLocation object representing the locationboolean isExprParameter(int valueToCheck, boolean recursive)
valueToCheck
- recursive
-
void setSubIters(XDMIterator[] subIt) throws MXQueryException
MXQueryException
void setSubIters(XDMIterator subIt)
XDMIterator[] getSubIters() throws MXQueryException
MXQueryException
XDMIterator[] getAllSubIters()
java.util.Vector getAllSubItersRecursive()
boolean isOpen()
boolean isConstModePreserve()
void setConstModePreserve(boolean constModePreserve)
KXmlSerializer traverseIteratorTree(KXmlSerializer serializer) throws java.lang.Exception
java.lang.Exception
|
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |