Debian Codegraph @

net/sf/saxon/expr/flwor/TuplePush.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.expr.flwor;
9
10 import net.sf.saxon.expr.XPathContext;
11 import net.sf.saxon.trans.XPathException;
12
13 /**
14 * Abtract class representing a tuple stream (used to evaluate a FLWOR expression) in push mode
15 * (where the provider of tuples activates the consumer of those tuples)
16 */
17 public abstract class TuplePush {
18
19 /**
20 * Notify the availability of the next tuple. Before calling this method,
21 * the supplier of the tuples must set all the variables corresponding
22 * to the supplied tuple in the local stack frame associated with the context object
23 *
24 * @param context the dynamic evaluation context
25 * @throws XPathException if a dynamic error occurs
26 */
27
28 public abstract void processTuple(XPathContext context) throws XPathException;
29
30 /**
31 * Close the tuple stream, indicating that no more tuples will be supplied
32 *
33 * @throws XPathException if a dynamic error occurs
34 */
35
36 public void close() throws XPathException {
37 // default implementation takes no action
38 }
39 }
40