- All Implemented Interfaces:
public class SwitchAdjunct extends TransmissionAdjunctStreaming code to implement a switch expression, which results from optimizing a choose where all the branches have similar test conditions. Unlike a choose, the conditions cannot be consuming: this is because the conditions must be similar, and if one is consuming then several will be consuming.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getWatchMaker(boolean forGrouping)Get a WatchMaker, a factory class that creates a Watch to evaluate this expression in streaming mode.
makeItemFeed(WatchManager watchManager, ItemFeed out, XPathContext context)
makeTransmissionFlow(WatchManager watchManager, Expression exp, ItemFeed out, XPathContext context)Make a Trigger that implements this expression in streaming mode.
setExpression(Expression expression)Set the expression being processed by this StreamingAdjunct
Methods inherited from class com.saxonica.ee.stream.adjunct.StreamingAdjunct
computeStreamability, findConsumingArg, getConfiguration, getDefaultFeedMaker, getExpression, getFeedMaker, makeStreamingAdjunct, setConfiguration, toStreamingPattern
public void setExpression(Expression expression)Description copied from class:
StreamingAdjunctSet the expression being processed by this StreamingAdjunct
public WatchMaker getWatchMaker(boolean forGrouping) throws XPathExceptionDescription copied from class:
StreamingAdjunctGet a WatchMaker, a factory class that creates a Watch to evaluate this expression in streaming mode. This method will only be called if the getImplementationMethod() method of the expression includes the value
public Trigger makeTransmissionFlow(WatchManager watchManager, Expression exp, ItemFeed out, XPathContext context) throws XPathExceptionDescription copied from class:
TransmissionAdjunctMake a Trigger that implements this expression in streaming mode. This method is used for an expression that is striding or crawling, and it delivers a Trigger connected to a sequence of Feeds which together have the effect of delivering a sequence of events and/or items that together represent the results of this instruction. This method MUST be implemented for every expression that has an operand whose usage is transmission (and for every such operand).
watchManager- the WatchManager that fires this trigger
exp- the expression
out- the next action in the push pipeline for evaluation
context- the XPath dynamic context
- the Trigger (a Watch with a pattern)
XPathException- if a dynamic evaluation error occurs.