|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.sort.ConditionalSorter
public class ConditionalSorter
An expression that sorts an underlying sequence into document order if some condition is true, or that returns the sequence "as is" (knowing that it doesn't need sorting) if the condition is false.
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.expr.Expression |
|---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
| Constructor Summary | |
|---|---|
ConditionalSorter(Expression condition,
DocumentSorter sorter)
Create a conditional document sorter |
|
| Method Summary | |
|---|---|
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. |
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConditionalSorter(Expression condition,
DocumentSorter sorter)
condition - the conditional expressionsorter - the sorting expression| Method Detail |
|---|
public Expression getCondition()
public DocumentSorter getDocumentSorter()
public int getCardinality()
getCardinality in class Expressionpublic int getImplementationMethod()
getImplementationMethod in class ExpressionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic Iterator iterateSubExpressions()
iterateSubExpressions in class Expression
public boolean replaceSubExpression(Expression original,
Expression replacement)
replaceSubExpression in class Expressionoriginal - the original subexpressionreplacement - the replacement subexpression
public Expression copy()
copy in class Expressionpublic void explain(ExpressionPresenter out)
explain in class Expressionout - 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 in class Expressionth - the type hierarchy cache
public Expression promote(PromotionOffer offer)
throws XPathException
promote in class Expressionoffer - 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 expression
XPathException - if any error is detected
public SequenceIterator iterate(XPathContext context)
throws XPathException
iterate in interface SequenceIterableiterate in class Expressioncontext - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||