public class Streamability
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
EXTENDED |
static int |
OFF |
static int |
STANDARD |
Constructor and Description |
---|
Streamability() |
Modifier and Type | Method and Description |
---|---|
static Sweep |
computeAccumulatorAfterSweep(SystemFunctionCall call,
ContextItemStaticInfoEE contextInfo,
java.util.List<java.lang.String> reasons)
Compute the sweep of a call to accumulator-after (which depends on what else is found in the
same sequence constructor
|
static PostureAndSweep |
generalStreamabilityRules(Expression target,
java.lang.Iterable<Operand> operands,
ContextItemStaticInfoEE contextInfo,
java.util.List<java.lang.String> reasons)
Implement the general streamability rules; the rules used to determine the posture and sweep of any
expression except when more specific rules are defined for that class of expression
|
static Operand |
getConsumingOperand(Expression exp)
Get the consuming (or potentially consuming) operand of an expression, assuming there is exactly one
|
static Posture |
getPosture(Expression exp) |
static PostureAndSweep |
getPostureAndSweepIfKnown(Expression exp)
Get the posture and sweep of the expression if these have already been computed
|
static PostureAndSweep |
getStreamability(Expression exp,
ContextItemStaticInfoEE contextInfo,
java.util.List<java.lang.String> reasons)
Get the posture and sweep of this expression as defined in the W3C streamability specifications.
|
static Sweep |
getSweep(Expression exp) |
static boolean |
isChildlessNodeKind(ItemType type)
Ask whether an ItemType only allows nodes that cannot have children
|
static Expression |
rewriteForExpressionAsMappingExpression(ForExpression forEx) |
static Expression |
rewriteQuantifiedExpressionAsFilterExpression(QuantifiedExpression quant) |
static void |
setPostureAndSweep(Expression exp,
PostureAndSweep ps) |
static Pattern |
toStreamingPattern(Expression expr,
Configuration config)
Convert an expression to a streaming pattern (a pattern used internally to match nodes during
push processing of an event stream)
|
public static final int OFF
public static final int STANDARD
public static final int EXTENDED
public static Operand getConsumingOperand(Expression exp)
exp
- the expressionpublic static Expression rewriteQuantifiedExpressionAsFilterExpression(QuantifiedExpression quant) throws XPathException
XPathException
public static Expression rewriteForExpressionAsMappingExpression(ForExpression forEx)
public static PostureAndSweep generalStreamabilityRules(Expression target, java.lang.Iterable<Operand> operands, ContextItemStaticInfoEE contextInfo, java.util.List<java.lang.String> reasons)
target
- the expression whose streamability is being analyzed (used only for diagnostics)operands
- the operands of the expression being evaluatedcontextInfo
- information about the static context item type and posturereasons
- (optionally null) an array to which explanations of non-streamability should
be appendedpublic static boolean isChildlessNodeKind(ItemType type)
type
- the item typepublic static Pattern toStreamingPattern(Expression expr, Configuration config)
expr
- the expression to be convertedconfig
- the Saxon configurationpublic static PostureAndSweep getStreamability(Expression exp, ContextItemStaticInfoEE contextInfo, java.util.List<java.lang.String> reasons)
contextInfo
- Information about the context item type and posturereasons
- the caller may supply a list, in which case the implementation may add to this
list a message explaining why the construct is not streamable, suitable for inclusion in anpublic static Posture getPosture(Expression exp)
public static Sweep getSweep(Expression exp)
public static PostureAndSweep getPostureAndSweepIfKnown(Expression exp)
public static void setPostureAndSweep(Expression exp, PostureAndSweep ps)
public static Sweep computeAccumulatorAfterSweep(SystemFunctionCall call, ContextItemStaticInfoEE contextInfo, java.util.List<java.lang.String> reasons)
call
- the call on accumulator-afterCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.