Package com.saxonica.ee.stream.adjunct
Class SubsequenceStreamer
- java.lang.Object
-
- com.saxonica.ee.stream.adjunct.StreamingAdjunct
-
- com.saxonica.ee.stream.adjunct.TransmissionAdjunct
-
- com.saxonica.ee.stream.adjunct.FilteringAdjunct
-
- com.saxonica.ee.stream.adjunct.SubsequenceStreamer
-
- All Implemented Interfaces:
FeedMaker
public class SubsequenceStreamer extends FilteringAdjunct implements FeedMaker
Generate streaming code for a subsequence() function call. Also used for expressions such as tail() that compile into a subsequence() call
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubsequenceStreamer.SubsequenceFilter
-
Constructor Summary
Constructors Constructor Description SubsequenceStreamer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeedMaker
getFeedMaker(int arg)
Get a FeedMaker, a factory class that creates a Feed to evaluate this expression in streaming mode.FilteringFeed.Filter
makeFilter(XPathContext context, ItemFeed out)
Make a filter for the event stream-
Methods inherited from class com.saxonica.ee.stream.adjunct.FilteringAdjunct
makeItemFeed
-
Methods inherited from class com.saxonica.ee.stream.adjunct.TransmissionAdjunct
getWatchMaker, makeTransmissionFlow
-
Methods inherited from class com.saxonica.ee.stream.adjunct.StreamingAdjunct
computeStreamability, emptyAdjunctMap, findConsumingArg, genId, getConfiguration, getDefaultFeedMaker, getExpression, makeStreamingAdjunct, setConfiguration, setExpression, toStreamingPattern
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.saxonica.ee.stream.feed.FeedMaker
makeItemFeed
-
-
-
-
Method Detail
-
getFeedMaker
public FeedMaker getFeedMaker(int arg) throws XPathException
Description copied from class:StreamingAdjunct
Get a FeedMaker, a factory class that creates a Feed to evaluate this expression in streaming mode. In many cases the StreamingAdjunct is itself a FeedMaker, in which case it returns itself. But where an expression has several operands, it will typically create different feeds depending on which argument is the streamed input, and in such cases the individual StreamingAdjunct makes the decision which feed to use, by returning an appropriate FeedMaker.- Overrides:
getFeedMaker
in classStreamingAdjunct
- Parameters:
arg
- identifies the argument with respect to which the expression is to be inverted: usually 0 to indicate the first argument is the value that is streamed. Argument numbering is the same as the sequence of arguments/operands returned by the methodExpression.operands()
- Returns:
- a FeedMaker to evaluate the expression, or null if it is not streamable with respect to the specificed argument.
- Throws:
XPathException
- in the event of a failure
-
makeFilter
public FilteringFeed.Filter makeFilter(XPathContext context, ItemFeed out) throws XPathException
Description copied from class:FilteringAdjunct
Make a filter for the event stream- Specified by:
makeFilter
in classFilteringAdjunct
- Parameters:
context
- the XPath dynamic contextout
- the destination for the filtered events- Returns:
- a filter that can be added to the event stream
- Throws:
XPathException
- if a dynamic evaluation error occurs
-
-