|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.sort.SortKeyDefinition
A SortKeyDefinition defines one component of a sort key.
Note that most attributes defining the sort key can be attribute value templates,
and can therefore vary from one invocation to another. We hold them as expressions. As
soon as they are all known (which in general is only at run-time), the SortKeyDefinition
is replaced by a FixedSortKeyDefinition in which all these values are fixed.
Field Summary | |
protected Expression |
caseOrder
|
protected java.util.Comparator |
collation
|
protected Expression |
dataTypeExpression
|
protected boolean |
emptyFirst
|
protected Expression |
language
|
protected Expression |
order
|
protected Expression |
sortKey
|
Constructor Summary | |
SortKeyDefinition()
|
Method Summary | |
Expression |
getCaseOrder()
|
java.util.Comparator |
getCollation()
|
Expression |
getDataTypeExpression()
|
boolean |
getEmptyFirst()
|
Expression |
getLanguage()
|
Expression |
getOrder()
|
Expression |
getSortKey()
Get the expression used as the sort key |
FixedSortKeyDefinition |
reduce(XPathContext context)
Evaluate any aspects of the sort definition that were specified as AVTs, for example ascending/descending, language, case-order, data-type. |
void |
setCaseOrder(Expression exp)
Set the case order. |
void |
setCollation(java.util.Comparator collation)
Set the collation. |
void |
setDataTypeExpression(Expression exp)
Set the data type. |
void |
setEmptyFirst(boolean emptyFirst)
Set whether empty sequence comes before other values or after them |
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 |
SortKeyDefinition |
simplify()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Expression sortKey
protected Expression order
protected Expression dataTypeExpression
protected Expression caseOrder
protected Expression language
protected java.util.Comparator collation
protected boolean emptyFirst
Constructor Detail |
public SortKeyDefinition()
Method Detail |
public void setSortKey(Expression exp)
public Expression getSortKey()
public void setOrder(Expression exp)
public Expression getOrder()
public void setDataTypeExpression(Expression exp)
public Expression getDataTypeExpression()
public void setCaseOrder(Expression exp)
public Expression getCaseOrder()
public void setLanguage(Expression exp)
public Expression getLanguage()
public void setCollation(java.util.Comparator collation)
public java.util.Comparator getCollation()
public void setEmptyFirst(boolean emptyFirst)
emptyFirst
- true if () is considered lower than any other valuepublic boolean getEmptyFirst()
public SortKeyDefinition simplify() throws XPathException
XPathException
public FixedSortKeyDefinition reduce(XPathContext context) throws XPathException
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |