|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.expr.Optimizer
com.saxonica.extra.OptimizerSA
This class doesn't actually do any optimization itself, despite the name. Rather, it is intended to act as a factory for implementation classes that perform optimization, so that the appropriate level of optimization can be selected.
Field Summary |
Fields inherited from class net.sf.saxon.expr.Optimizer |
config |
Constructor Summary | |
OptimizerSA(Configuration config)
|
Method Summary | |
ComputedExpression |
convertFilterExpressionToKey(FilterExpression f,
StaticContext env,
Expression doc)
Convert a filter expression to a call on the key function. |
Expression |
convertPathExpressionToKey(PathExpression pathExp,
StaticContext env)
Examine a path expression to see whether it can be replaced by a call on the key() function; if so, generate an appropriate key definition and return the call on key(). |
FilterExpression |
convertToFilterExpression(PathExpression pathExp,
TypeHierarchy th)
Convert a path expression such as a/b/c[predicate] into a filter expression of the form (a/b/c)[predicate]. |
int |
isIndexableFilter(Expression filter)
Test whether a filter predicate is indexable. |
Closure |
makeClosure(Expression expression,
int ref)
Make a Closure, given the expected reference count |
BinaryExpression |
makeGeneralComparison(Expression p0,
int op,
Expression p1,
boolean backwardsCompatible)
Create a GeneralComparison expression |
Expression |
optimizeCopy(Expression select)
Attempt to optimize a copy operation. |
Expression |
optimizeSequentialCopy(Expression select)
Given a select expression, determine whether it is a candidate for sequential processing, and if so, return a SequentialCopy expression that does the work. |
SequenceIterator |
tryIndexedFilter(ValueRepresentation startValue,
Expression filter,
int isIndexable,
XPathContext context)
|
ComputedExpression |
tryToConvertFilterExpressionToKey(FilterExpression f,
StaticContext env)
Try converting a filter expression to a call on the key function. |
Methods inherited from class net.sf.saxon.expr.Optimizer |
getConfiguration |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OptimizerSA(Configuration config)
Method Detail |
public BinaryExpression makeGeneralComparison(Expression p0, int op, Expression p1, boolean backwardsCompatible)
makeGeneralComparison
in class Optimizer
public Expression optimizeCopy(Expression select) throws XPathException
optimizeCopy
in class Optimizer
select
- the expression that selects the items to be copied
XPathException
public Expression optimizeSequentialCopy(Expression select) throws XPathException
To qualify, the select expression must be a path expression that starts with a call on doc() or document(), and whose subsequent steps are all axis steps using the child, descendant, and attribute axes only; there must be no predicates.
XPathException
public Closure makeClosure(Expression expression, int ref)
makeClosure
in class Optimizer
public Expression convertPathExpressionToKey(PathExpression pathExp, StaticContext env) throws XPathException
convertPathExpressionToKey
in class Optimizer
pathExp
- The path expression to be converted.
XPathException
public ComputedExpression tryToConvertFilterExpressionToKey(FilterExpression f, StaticContext env) throws XPathException
tryToConvertFilterExpressionToKey
in class Optimizer
XPathException
public ComputedExpression convertFilterExpressionToKey(FilterExpression f, StaticContext env, Expression doc) throws XPathException
XPathException
public FilterExpression convertToFilterExpression(PathExpression pathExp, TypeHierarchy th) throws StaticError
convertToFilterExpression
in class Optimizer
pathExp
- the path expression to be converted
StaticError
public int isIndexableFilter(Expression filter)
isIndexableFilter
in class Optimizer
filter
- the predicate expression
public SequenceIterator tryIndexedFilter(ValueRepresentation startValue, Expression filter, int isIndexable, XPathContext context) throws XPathException
tryIndexedFilter
in class Optimizer
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |