|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.Expression net.sf.saxon.expr.UnaryExpression net.sf.saxon.expr.sort.DocumentSorter
public class DocumentSorter
A DocumentSorter is an expression that sorts a sequence of nodes into document order.
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.UnaryExpression |
---|
operand |
Fields inherited from class net.sf.saxon.expr.Expression |
---|
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD |
Constructor Summary | |
---|---|
DocumentSorter(Expression base)
|
Method Summary | |
---|---|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type). |
Expression |
copy()
Copy an expression. |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression. |
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
ItemOrderComparer |
getComparer()
|
String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user. |
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Expression |
optimize(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Perform optimisation of an expression and its subexpressions. |
Expression |
promote(PromotionOffer offer,
Expression parent)
Promote this expression if possible |
Expression |
simplify(ExpressionVisitor visitor)
Simplify an expression |
Methods inherited from class net.sf.saxon.expr.UnaryExpression |
---|
computeCardinality, displayOperator, equals, getBaseExpression, getItemType, hashCode, iterateSubExpressions, replaceSubExpression, toString, typeCheck |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DocumentSorter(Expression base)
Method Detail |
---|
public String getExpressionName()
getExpressionName
in class Expression
public ItemOrderComparer getComparer()
public Expression simplify(ExpressionVisitor visitor) throws XPathException
UnaryExpression
simplify
in class UnaryExpression
visitor
- an expression visitor
XPathException
- if an error is discovered during expression
rewritingpublic Expression optimize(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
UnaryExpression
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.
optimize
in class UnaryExpression
visitor
- an expression visitorcontextItemType
- 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 to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public int computeSpecialProperties()
UnaryExpression
computeSpecialProperties
in class UnaryExpression
public Expression copy()
copy
in class Expression
public Expression promote(PromotionOffer offer, Expression parent) throws XPathException
promote
in class UnaryExpression
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 expressionparent
- the containing expression in the expression tree
XPathException
- if any error is detectedpublic SequenceIterator iterate(XPathContext context) throws XPathException
Expression
iterate
in class Expression
context
- supplies the context for evaluation
XPathException
- if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext context) throws XPathException
Expression
effectiveBooleanValue
in class Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic void explain(ExpressionPresenter out)
explain
in class UnaryExpression
out
- the expression presenter used to display the structure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |