Package com.saxonica.ee.stream.adjunct
Class FilterExpressionAdjunct
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.FilterExpressionAdjunct
- All Implemented Interfaces:
FeedMaker
Generate streaming code for a filter expression (when not part of a Watch).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeStreamability(ContextItemStaticInfoEE contextInfo, List<String> reasons) Compute the posture and sweep of this expression as defined in the W3C streamability specifications.getFeedMaker(int arg) Get a FeedMaker, a factory class that creates a Feed to evaluate this expression in streaming mode.makeFilter(XPathContext context, ItemFeed out) Make a filter for the event streamvoidsetExpression(Expression expression) Set the expression being processed by this StreamingAdjuncttoStreamingPattern(Configuration config) Convert this expression to a streaming pattern (a pattern used internally to match nodes during push processing of an event stream)Methods inherited from class com.saxonica.ee.stream.adjunct.FilteringAdjunct
makeItemFeedMethods inherited from class com.saxonica.ee.stream.adjunct.TransmissionAdjunct
getWatchMaker, makeTransmissionFlowMethods inherited from class com.saxonica.ee.stream.adjunct.StreamingAdjunct
emptyAdjunctMap, findConsumingArg, genId, getConfiguration, getDefaultFeedMaker, getExpression, makeStreamingAdjunct, setConfiguration
-
Constructor Details
-
FilterExpressionAdjunct
public FilterExpressionAdjunct()
-
-
Method Details
-
setExpression
Set the expression being processed by this StreamingAdjunct- Overrides:
setExpressionin classStreamingAdjunct- Parameters:
expression- the expression being processed
-
computeStreamability
public PostureAndSweep computeStreamability(ContextItemStaticInfoEE contextInfo, List<String> reasons) Description copied from class:StreamingAdjunctCompute the posture and sweep of this expression as defined in the W3C streamability specifications. This must be implemented in all subclasses that don't use the general streamability rules. The implementation should have the side-effect of computing the streamability of all subexpressions, recursively.- Overrides:
computeStreamabilityin classStreamingAdjunct- Parameters:
contextInfo- Information about the context item type and posturereasons- the caller may supply a list, in which case the implementation may add to this; the contents are human-readable messages explaining why the expression is not streamable.- Returns:
- the posture and sweep of the expression
-
toStreamingPattern
Convert this expression to a streaming pattern (a pattern used internally to match nodes during push processing of an event stream)- Overrides:
toStreamingPatternin classStreamingAdjunct- Parameters:
config- the Saxon configuration- Returns:
- the equivalent pattern if conversion succeeds; otherwise null
-
makeFilter
Make a filter for the event stream- Specified by:
makeFilterin classFilteringAdjunct- Parameters:
context- the XPath dynamic contextout- the next filter in the pipeline- Returns:
- a filter that can be added to the event stream
-
getFeedMaker
Description copied from class:StreamingAdjunctGet 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:
getFeedMakerin 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
-