|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.sort.SortKeyDefinition
public class 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.
Constructor Summary | |
---|---|
SortKeyDefinition()
|
Method Summary | |
---|---|
String |
getBaseURI()
|
Expression |
getCaseOrder()
|
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()
|
boolean |
getEmptyLeast()
Discover 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()
|
Expression |
getOrder()
|
Container |
getParentExpression()
|
Expression |
getSortKey()
Get the expression used as the sort key |
Expression |
getStable()
|
boolean |
isBackwardsCompatible()
|
boolean |
isFixed()
Discover 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)
|
void |
setBaseURI(String baseURI)
|
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 |
setParentExpression(Container container)
|
void |
setSortKey(Expression exp)
Set the expression used as the sort key |
void |
setStable(Expression stable)
|
SortKeyDefinition |
simplify(StaticContext env,
Executable exec)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortKeyDefinition()
Method Detail |
---|
public void setParentExpression(Container container)
public Container getParentExpression()
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 setCollationNameExpression(Expression collationName)
public Expression getCollationNameExpression()
public void setCollation(StringCollator collation)
collation
- A NamedCollation, which encapsulates both the collation URI and the collating functionpublic StringCollator getCollation()
public void setBaseURI(String baseURI)
public String getBaseURI()
public void setStable(Expression stable)
public Expression getStable()
public void setBackwardsCompatible(boolean compatible)
public boolean isBackwardsCompatible()
public void setEmptyLeast(boolean emptyLeast)
emptyLeast
- true if () is considered lower than any other valuepublic boolean getEmptyLeast()
public boolean isFixed()
public SortKeyDefinition simplify(StaticContext env, Executable exec) throws XPathException
XPathException
public AtomicComparer makeComparator(XPathContext context) throws XPathException
XPathException
public void setFinalComparator(AtomicComparer comp)
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 .
public AtomicComparer getFinalComparator()
makeComparator(net.sf.saxon.expr.XPathContext)
method.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |