public class ConditionalSorter extends Expression
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties
?????? |
---|
ConditionalSorter(Expression condition,
DocumentSorter sorter)
Create a conditional document sorter
|
?????? | ????? |
---|---|
protected int |
computeCardinality()
Compute the static cardinality of this expression
|
protected int |
computeSpecialProperties()
Compute the special properties of this expression.
|
Expression |
copy()
Copy an expression.
|
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
int |
getCardinality()
Determine the static cardinality of the expression.
|
Expression |
getCondition()
Get the condition under which the nodes need to be sorted
|
DocumentSorter |
getDocumentSorter()
Get the document sorter, which sorts the nodes if the condition is true
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible.
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
java.util.Iterator |
iterateSubExpressions()
Get the immediate sub-expressions of this expression.
|
Expression |
promote(PromotionOffer offer)
Offer promotion for this subexpression.
|
boolean |
replaceSubExpression(Expression original,
Expression replacement)
Replace one subexpression by a replacement subexpression
|
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, findParentOf, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, optimize, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, toString, typeCheck, typeError
public ConditionalSorter(Expression condition, DocumentSorter sorter)
condition
- the conditional expressionsorter
- the sorting expressionpublic Expression getCondition()
public DocumentSorter getDocumentSorter()
public int getCardinality()
getCardinality
??? Expression
protected int computeSpecialProperties()
StaticProperty
. The "special" properties are properties
other than cardinality and dependencies, and most of them relate to properties of node sequences, for
example whether the nodes are in document order.computeSpecialProperties
??? Expression
public int getImplementationMethod()
getImplementationMethod
??? Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public java.util.Iterator iterateSubExpressions()
iterateSubExpressions
??? Expression
public boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression
??? Expression
original
- the original subexpressionreplacement
- the replacement subexpressionprotected int computeCardinality()
computeCardinality
??? Expression
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public Expression copy()
copy
??? Expression
public void explain(ExpressionPresenter out)
explain
??? Expression
out
- the expression presenter used to display the structurepublic ItemType getItemType(TypeHierarchy th)
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
??? Expression
th
- the type hierarchy cachepublic Expression promote(PromotionOffer offer) throws XPathException
promote
??? Expression
offer
- details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException
- if any error is detectedpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate
???? SequenceIterable
iterate
??? Expression
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expression