| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.FilterExpression
FilterExpression | final public class FilterExpression extends ComputedExpression (Code) | | A FilterExpression contains a base expression and a filter predicate, which may be an
integer expression (positional filter), or a boolean expression (qualifier)
|
FilterExpression | public FilterExpression(Expression start, Expression filter, StaticContext env) throws StaticError(Code) | | Constructor
Parameters: start - A node-set expression denoting the absolute or relative set of nodes from which thenavigation path should start. Parameters: filter - An expression defining the filter predicate |
computeCardinality | public int computeCardinality()(Code) | | Get the static cardinality of this expression
the cardinality. The method attempts to determine the case where thefilter predicate is guaranteed to select at most one item from the sequence being filtered |
computeDependencies | public int computeDependencies()(Code) | | Determine which aspects of the context the expression depends on. The result is
a bitwise-or'ed value composed from constants such as XPathContext.VARIABLES and
XPathContext.CURRENT_NODE
the dependencies |
computeSpecialProperties | public int computeSpecialProperties()(Code) | | Get the static properties of this expression (other than its type). The result is
bit-significant. These properties are used for optimizations. In general, if
property bit is set, it is true, but if it is unset, the value is unknown.
the static properties of the expression, as a bit-significant value |
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure
Parameters: level - the indentation level Parameters: out - |
equals | public boolean equals(Object other)(Code) | | Is this expression the same as another expression?
Parameters: other - the expression to be compared with this one true if the two expressions are statically equivalent |
getBaseExpression | public Expression getBaseExpression()(Code) | | Get the underlying expression
the expression being filtered |
getFilter | public Expression getFilter()(Code) | | Get the filter expression
the expression acting as the filter predicate |
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Get the data type of the items returned
an integer representing the data type Parameters: th - |
hashCode | public int hashCode()(Code) | | get HashCode for comparing two expressions
the hash code |
isIndexable | public boolean isIndexable()(Code) | | |
isPositional | public boolean isPositional(TypeHierarchy th)(Code) | | Determine if the filter is positional
true if the value of the filter depends on the position of the item againstwhich it is evaluated Parameters: th - the Type Hierarchy (for cached access to type information) |
iterateSubExpressions | public Iterator iterateSubExpressions()(Code) | | Get the immediate subexpressions of this expression
the subexpressions, as an array |
optimize | public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Perform optimisation of an expression and its subexpressions.
This method is called after all references to functions and variables have been resolved
to the declaration of the function or variable, and after all type checking has been done.
Parameters: opt - the optimizer in use. This provides access to supporting functions; it also allowsdifferent optimization strategies to be used in different circumstances. Parameters: env - the static context of the expression Parameters: contextItemType - the static type of "." at the point where this expression is invoked.The parameter is set to null if it is known statically that the context item will be undefined.If the type of the context item is not known statically, the argument is set tonet.sf.saxon.type.Type.ITEM_TYPE the original expression, rewritten if appropriate to optimize execution throws: net.sf.saxon.trans.StaticError - if an error is discovered during this phase(typically a type error) |
promote | public Expression promote(PromotionOffer offer) throws XPathException(Code) | | Promote this expression if possible
Parameters: offer - details of the promotion that is possible the promoted expression (or the original expression, unchanged) |
typeCheck | public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Type-check the expression
Parameters: env - the static context the expression after type-checking (potentially modified to add run-timechecks and/or conversions) |
|
|