org.apache.xalan.xsltc.dom
Class NodeSortRecord
java.lang.Object
|
+--org.apache.xalan.xsltc.dom.NodeSortRecord
- public abstract class NodeSortRecord
- extends java.lang.Object
Base class for sort records containing application specific sort keys
Constructor Summary |
NodeSortRecord()
|
NodeSortRecord(int node)
This constructor is run by a call to Class.forName() in the
makeNodeSortRecord method in the NodeSortRecordFactory class. |
Method Summary |
int |
compareDocOrder(NodeSortRecord other)
|
int |
compareTo(NodeSortRecord other)
Compare this sort element to another. |
abstract int |
compareType(int level)
Returns compare type for a level of this key. |
abstract java.lang.String |
extractValueFromDOM(DOM dom,
int current,
int level,
Translet translet,
int last)
Extract the sort value for a level of this key. |
java.text.Collator |
getCollator()
Returns the Collator used for text comparisons in this object. |
int |
getNode()
Returns the node for this sort object |
void |
initialize(int node,
int last,
int levels,
DOM dom,
Translet translet)
This method allows the caller to set the values that could not be passed
to the default constructor. |
abstract int |
sortOrder(int level)
Returns sort order for a level of this key. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
COMPARE_STRING
public static int COMPARE_STRING
COMPARE_NUMERIC
public static int COMPARE_NUMERIC
COMPARE_ASCENDING
public static int COMPARE_ASCENDING
COMPARE_DESCENDING
public static int COMPARE_DESCENDING
NodeSortRecord
public NodeSortRecord(int node)
- This constructor is run by a call to Class.forName() in the
makeNodeSortRecord method in the NodeSortRecordFactory class. Since we
cannot pass any parameters to the constructor in that case we just set
the default values here and wait for new values through initialize().
NodeSortRecord
public NodeSortRecord()
initialize
public final void initialize(int node,
int last,
int levels,
DOM dom,
Translet translet)
- This method allows the caller to set the values that could not be passed
to the default constructor.
getNode
public final int getNode()
- Returns the node for this sort object
compareDocOrder
public final int compareDocOrder(NodeSortRecord other)
compareTo
public int compareTo(NodeSortRecord other)
- Compare this sort element to another. The first level is checked first,
and we proceed to the next level only if the first level keys are
identical (and so the key values may not even be extracted from the DOM)
!!!!MUST OPTIMISE - THIS IS REALLY, REALLY SLOW!!!!
getCollator
public java.text.Collator getCollator()
- Returns the Collator used for text comparisons in this object.
May be overridden by inheriting classes
compareType
public abstract int compareType(int level)
- Returns compare type for a level of this key.
Must return either COMPARE_STRING or COMPARE_NUMERIC.
sortOrder
public abstract int sortOrder(int level)
- Returns sort order for a level of this key.
Most return either COMPARE_ASCENDING or COMPARE_DESCENDING.
extractValueFromDOM
public abstract java.lang.String extractValueFromDOM(DOM dom,
int current,
int level,
Translet translet,
int last)
- Extract the sort value for a level of this key.
Copyright © 2000 Apache XML Project. All Rights Reserved.