Class ForMemberClause


  • public class ForMemberClause
    extends ForClause
    A "for member" clause in a FLWOR expression (XQuery 4.0: iterates over members of an array)
    • Constructor Detail

      • ForMemberClause

        public ForMemberClause()
    • Method Detail

      • getClauseKey

        public Clause.ClauseName getClauseKey()
        Description copied from class: Clause
        Get a keyword identifying what kind of clause this is
        Overrides:
        getClauseKey in class ForClause
        Returns:
        the kind of clause
      • copy

        public ForMemberClause copy​(FLWORExpression flwor,
                                    RebindingMap rebindings)
        Description copied from class: Clause
        Create a copy of this clause
        Overrides:
        copy in class ForClause
        Parameters:
        flwor - the new FLWORExpression to contain the copied clause
        rebindings - the rebinding map
        Returns:
        the copied clause
      • 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:
        getPullStream in class ForClause
        Parameters:
        base - the input tuple stream
        context - 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:
        getPushStream in class ForClause
        Parameters:
        destination - the output tuple stream
        output - the destination for the result
        context - 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:
        addPredicate in class ForClause
        Parameters:
        flwor - the FLWOR expression (sans the relevant part of the where clause)
        visitor - the expression visitor
        contextItemType - the item type of the context item
        condition - 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: Clause
        Supply improved type information to the expressions that contain references to the variables declared in this clause
        Overrides:
        refineVariableType in class ForClause
        Parameters:
        visitor - the expression visitor
        references - the list of variable references
        returnExpr - the expression in the return clause
      • addToPathMap

        public void addToPathMap​(PathMap pathMap,
                                 PathMap.PathMapNodeSet pathMapNodeSet)
        Description copied from class: Clause
        Collect information about the navigation paths followed by this clause, for document projection purposes
        Overrides:
        addToPathMap in class ForClause
        Parameters:
        pathMap - the path map in which the data is to be collected
        pathMapNodeSet - the path map node set representing the paths to the context item