ch.ethz.mxquery.iterators.scripting
Class BlockDeclIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.iterators.scripting.BlockDeclIterator
- All Implemented Interfaces:
- XDMIterator, Traversable
public class BlockDeclIterator
- extends Iterator
BLOCK DECLARATION
Method Summary |
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 |
setResettable(boolean r)
Set this Iterator (and its subiterators) resetable. |
KXmlSerializer |
traverseIteratorTree(KXmlSerializer serializer)
|
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 |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockDeclIterator
public BlockDeclIterator(Context ctx,
XDMIterator[] sourceExprs,
QName[] varNames,
QueryLocation location)
throws MXQueryException
- Constructor
- Parameters:
sourceExprs
- Array of initial values for the declared variable (the array
contains null
if a variable has no initial
value)varNames
- array of declared names
- 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
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
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
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich