Package net.sf.saxon.expr.flwor
Class ForMemberClause
- java.lang.Object
-
- net.sf.saxon.expr.flwor.Clause
-
- net.sf.saxon.expr.flwor.ForClause
-
- net.sf.saxon.expr.flwor.ForMemberClause
-
public class ForMemberClause extends ForClause
A "for member" clause in a FLWOR expression (XQuery 4.0: iterates over members of an array)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.saxon.expr.flwor.Clause
Clause.ClauseName
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.expr.flwor.ForClause
allowsEmpty, positionVariable, rangeVariable, sequenceOp
-
-
Constructor Summary
Constructors Constructor Description ForMemberClause()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddPredicate(FLWORExpression flwor, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType, Expression condition)Convert where clause to a predicate.voidaddToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)Collect information about the navigation paths followed by this clause, for document projection purposesForMemberClausecopy(FLWORExpression flwor, RebindingMap rebindings)Create a copy of this clauseClause.ClauseNamegetClauseKey()Get a keyword identifying what kind of clause this isTuplePullgetPullStream(TuplePull base, XPathContext context)Get a tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifiesTuplePushgetPushStream(TuplePush destination, Outputter output, XPathContext context)Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple streamvoidrefineVariableType(ExpressionVisitor visitor, java.util.List<VariableReference> references, Expression returnExpr)Supply improved type information to the expressions that contain references to the variables declared in this clausevoidtypeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo)Type-check the expression-
Methods inherited from class net.sf.saxon.expr.flwor.ForClause
explain, gatherVariableReferences, getPositionVariable, getRangeVariable, getRangeVariables, getSequence, initSequence, isAllowingEmpty, processOperands, setAllowingEmpty, setPositionVariable, setRangeVariable, setSequence, toShortString, toString
-
Methods inherited from class net.sf.saxon.expr.flwor.Clause
containsNonInlineableVariableReference, getConfiguration, getLocation, getPackageData, getTraceInfo, isRepeated, optimize, setLocation, setPackageData, setRepeated
-
-
-
-
Method Detail
-
getClauseKey
public Clause.ClauseName getClauseKey()
Description copied from class:ClauseGet a keyword identifying what kind of clause this is- Overrides:
getClauseKeyin classForClause- Returns:
- the kind of clause
-
copy
public ForMemberClause copy(FLWORExpression flwor, RebindingMap rebindings)
Description copied from class:ClauseCreate a copy of this clause
-
typeCheck
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
Type-check the expression- Overrides:
typeCheckin classForClause- Parameters:
visitor- the ExpressionVisitor, providing access to static context informationcontextInfo- static information about the dynamic context- Throws:
XPathException- if any error is detected
-
getPullStream
public TuplePull getPullStream(TuplePull base, XPathContext context)
Get a tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifies- Overrides:
getPullStreamin classForClause- Parameters:
base- the input tuple streamcontext- the XPath dynamic context- Returns:
- the output tuple stream
-
getPushStream
public TuplePush getPushStream(TuplePush destination, Outputter output, XPathContext context)
Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple stream- Overrides:
getPushStreamin classForClause- Parameters:
destination- the output tuple streamoutput- the destination for the resultcontext- the dynamic evaluation context- Returns:
- the push tuple stream that implements the functionality of this clause of the FLWOR expression
-
addPredicate
public boolean addPredicate(FLWORExpression flwor, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType, Expression condition) throws XPathException
Convert where clause to a predicate.- Overrides:
addPredicatein classForClause- Parameters:
flwor- the FLWOR expression (sans the relevant part of the where clause)visitor- the expression visitorcontextItemType- the item type of the context itemcondition- the predicate to be added. This will always be a single term (never a composite condition using "and"), as the where clause is split into separate terms before calling this method- Returns:
- true if the expression has been changed, that is, if the where clause has been converted
- Throws:
XPathException- if an error is encountered
-
refineVariableType
public void refineVariableType(ExpressionVisitor visitor, java.util.List<VariableReference> references, Expression returnExpr)
Description copied from class:ClauseSupply improved type information to the expressions that contain references to the variables declared in this clause- Overrides:
refineVariableTypein classForClause- Parameters:
visitor- the expression visitorreferences- the list of variable referencesreturnExpr- the expression in the return clause
-
addToPathMap
public void addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Description copied from class:ClauseCollect information about the navigation paths followed by this clause, for document projection purposes- Overrides:
addToPathMapin classForClause- Parameters:
pathMap- the path map in which the data is to be collectedpathMapNodeSet- the path map node set representing the paths to the context item
-
-