ch.ethz.mxquery.iterators
Class CastAsIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.model.TokenBasedIterator
ch.ethz.mxquery.iterators.CastAsIterator
- All Implemented Interfaces:
- XDMIterator, Traversable
public class CastAsIterator
- extends TokenBasedIterator
Implements cast as TYPE (single atomic value) and
casting sequences of atomic values (for function parameters)
Implemented using the xs:TYPE casting functions
Method Summary |
TypeInfo |
getStaticType()
Return the return type if it can be statically determined |
Token |
next()
generate next Token, needs to be implemented by the respective iterator |
Methods inherited from class ch.ethz.mxquery.model.Iterator |
addPredicates, close, copy, copyInts, copyIterators, copyQNames, copyStrings, copyTypeInfos, getAllSubIters, getAllSubItersRecursive, getContext, getExpressionCategoryType, getLoc, getPendingUpdateList, getPredicates, 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 |
CastAsIterator
public CastAsIterator(Context ctx,
XDMIterator subIters,
TypeInfo typeInfo,
boolean onlyCheckCastable,
boolean onlyCastUntyped,
QueryLocation location)
next
public Token next()
throws MXQueryException
- Description copied from class:
TokenBasedIterator
- generate next Token, needs to be implemented by the respective iterator
- 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
getStaticType
public TypeInfo getStaticType()
- Description copied from interface:
XDMIterator
- Return the return type if it can be statically determined
- Specified by:
getStaticType
in interface XDMIterator
- Overrides:
getStaticType
in class Iterator
- Returns:
- a Type info carrying the most precise static type that could be determined. If no specific type could be determined, the type is ITEM*
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich