org.apache.xalan.xsltc.dom

Class NodeSortRecord

public abstract class NodeSortRecord extends Object

Base class for sort records containing application specific sort keys
Field Summary
static intCOMPARE_ASCENDING
static intCOMPARE_DESCENDING
static intCOMPARE_NUMERIC
static intCOMPARE_STRING
Constructor Summary
NodeSortRecord(int node)
This constructor is run by a call to ClassLoader in the makeNodeSortRecord method in the NodeSortRecordFactory class.
NodeSortRecord()
Method Summary
intcompareDocOrder(NodeSortRecord other)
intcompareTo(NodeSortRecord other)
Compare this sort element to another.
abstract StringextractValueFromDOM(DOM dom, int current, int level, AbstractTranslet translet, int last)
Extract the sort value for a level of this key.
Collator[]getCollator()
Returns the array of Collators used for text comparisons in this object.
intgetNode()
Returns the node for this sort object
voidinitialize(int node, int last, DOM dom, SortSettings settings)
This method allows the caller to set the values that could not be passed to the default constructor.

Field Detail

COMPARE_ASCENDING

public static final int COMPARE_ASCENDING

COMPARE_DESCENDING

public static final int COMPARE_DESCENDING

COMPARE_NUMERIC

public static final int COMPARE_NUMERIC

COMPARE_STRING

public static final int COMPARE_STRING

Constructor Detail

NodeSortRecord

public NodeSortRecord(int node)
This constructor is run by a call to ClassLoader 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()

Method Detail

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!!!!

extractValueFromDOM

public abstract String extractValueFromDOM(DOM dom, int current, int level, AbstractTranslet translet, int last)
Extract the sort value for a level of this key.

getCollator

public Collator[] getCollator()
Returns the array of Collators used for text comparisons in this object. May be overridden by inheriting classes

getNode

public final int getNode()
Returns the node for this sort object

initialize

public final void initialize(int node, int last, DOM dom, SortSettings settings)
This method allows the caller to set the values that could not be passed to the default constructor.
Copyright B) 2005 Apache XML Project. All Rights Reserved.