net.sf.saxon.sort
public class SortKeyDefinition extends Object implements Serializable
Field Summary | |
---|---|
protected boolean | backwardsCompatible |
protected String | baseURI |
protected Expression | caseOrder |
protected StringCollator | collation |
protected Expression | collationName |
protected Expression | dataTypeExpression |
protected boolean | emptyLeast |
protected Expression | language |
protected Expression | order |
protected Expression | sortKey |
protected Expression | stable |
Method Summary | |
---|---|
String | getBaseURI()
Get the static base URI of the expression. |
Expression | getCaseOrder()
Get the expression that defines the case order of the sort keys. |
StringCollator | getCollation()
Get the collation to be used |
Expression | getCollationNameExpression()
Get the selected collation name
(specifically, an expression which when evaluated returns the collation URI). |
Expression | getDataTypeExpression()
Get the expression that defines the data type of the sort keys |
boolean | getEmptyLeast()
Ask whether empty sequence comes before other values or after them |
AtomicComparer | getFinalComparator()
Get the comparator which is used to compare two values according to this sort key. |
Expression | getLanguage()
Get the expression that defines the language of the sort keys |
Expression | getOrder()
Get the expression that defines the order as ascending or descending |
Expression | getSortKey()
Get the expression used as the sort key |
Expression | getStable()
Ask whether this sort key definition is stable |
boolean | isBackwardsCompatible()
Ask whether this sort key is evaluated in XSLT 1.0 backwards compatibility mode |
boolean | isFixed()
Ask whether the sort key definition is fixed, that is, whether all the information needed
to create a Comparator is known statically |
AtomicComparer | makeComparator(XPathContext context)
Allocate an AtomicComparer to perform the comparisons described by this sort key component. |
void | setBackwardsCompatible(boolean compatible)
Set whether this sort key is evaluated in XSLT 1.0 backwards compatibility mode |
void | setBaseURI(String baseURI)
Set the base URI of the expression. |
void | setCaseOrder(Expression exp)
Set the case order. |
void | setCollation(StringCollator collation)
Set the collation to be used |
void | setCollationNameExpression(Expression collationName)
Set the collation name (specifically, an expression which when evaluated returns the collation URI). |
void | setDataTypeExpression(Expression exp)
Set the data type. |
void | setEmptyLeast(boolean emptyLeast)
Set whether empty sequence comes before other values or after them |
void | setFinalComparator(AtomicComparer comp)
Set the comparator which is used to compare two values according to this sort key. |
void | setLanguage(Expression exp)
Set the language. |
void | setOrder(Expression exp)
Set the order. |
void | setSortKey(Expression exp)
Set the expression used as the sort key |
void | setStable(Expression stable)
Set whether this sort key definition is stable |
SortKeyDefinition | simplify(ExpressionVisitor visitor)
Simplify this sort key definition |
void | typeCheck(ExpressionVisitor visitor, ItemType contextItemType)
Type-check this sort key definition (all properties other than the sort key
select expression, which has a different dynamic context |
Returns: the static base URI of the expression
Returns: the expression that defines the case order, whose run-time value will be "upper-first", "lower-first", or "#default".
Returns: A StringCollator, which encapsulates both the collation URI and the collating function
Returns: the expression that determines the collation name
Returns: the expression that defines the data type, as used in XSLT 1.0
Returns: true if () is considered lower than any other value
Returns: the Atomic Comparer to be used
Returns: exp the expression that determines the language
Returns: the expression that determines the order (always a literal in XQuery, but can be defined by an AVT in XSLT)
Returns: the sort key select expression
Returns: the expression that determines whether the sort key definition is stable (it evaluates to the string "yes" or "no".
Returns: true if backwards compatibility mode was selected
Returns: true if all information needed to create a Comparator is known statically
Parameters: context the dynamic evaluation context
Returns: an AtomicComparer suitable for making the sort comparisons
Parameters: compatible true if backwards compatibility mode is selected
Parameters: baseURI the static base URI of the expression
Parameters: exp the expression that defines the case order
Parameters: collation A StringCollator, which encapsulates both the collation URI and the collating function
Parameters: collationName the expression that determines the collation name
Parameters: exp the expression that defines the data type, as used in XSLT 1.0
Parameters: emptyLeast true if () is considered lower than any other value
This method is called at compile time if all these factors are known at compile time. It must not be called at run-time, except to reconstitute a finalComparator that has been lost by virtue of serialization .
Parameters: comp the Atomic Comparer to be used
Parameters: exp the expression that determines the language
Parameters: exp the expression that determines the order (always a literal in XQuery, but can be defined by an AVT in XSLT)
Parameters: exp the sort key select expression
Parameters: stable the expression that determines whether the sort key definition is stable (it evaluates to the string "yes" or "no".
Parameters: visitor the expression visitor
Returns: the simplified sort key definition
Throws: XPathException if any failure occurs
Parameters: visitor the expression visitor contextItemType the type of the context item
Throws: XPathException if any failure occurs