APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.dom

public abstract Class NodeSortRecord

extends Object
Class Inheritance
Imports
com.sun.org.apache.xalan.internal.xsltc.DOM, .TransletException, com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet, com.sun.org.apache.xml.internal.utils.StringComparable, java.text.Collator, java.util.Locale

Base class for sort records containing application specific sort keys

Field Summary

Modifier and TypeField and Description
protected Collator
_collator

Deprecated This field continues to exist for binary compatibility. New code should not refer to it.
A reference to the first Collator
protected Collator[]
private DOM
private int
protected Locale
_locale

Deprecated This field continues to exist for binary compatibility. New code should not refer to it.
A locale field that might be set by an instance of a subclass.
private int
private int
protected SortSettings
private Object[]
public static final int
public static final int
public static final int
public static final int
private static final Collator
DEFAULT_COLLATOR

Deprecated This field continues to exist for binary compatibility. New code should not refer to it.
A reference to a collator.

Constructor Summary

AccessConstructor and Description
public
NodeSortRecord(int node)

This constructor is run by a call to ClassLoader in the makeNodeSortRecord method in the NodeSortRecordFactory class.

public

Method Summary

Modifier and TypeMethod and Description
public final int
public int
compareTo(NodeSortRecord other)

Compare this sort element to another.

public abstract String
extractValueFromDOM(DOM dom, int current, int level, AbstractTranslet translet, int last)

Extract the sort value for a level of this key.

public Collator[]
getCollator()

Returns the array of Collators used for text comparisons in this object.

public final int
getNode()

Returns the node for this sort object

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.

private final Double
numericValue(int level)

private final Comparable<T>
stringValue(int level)

Get the string or numeric value of a specific level key for this sort element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_collatorback to summary
protected Collator _collator

Deprecated

This field continues to exist for binary compatibility. New code should not refer to it.

A reference to the first Collator

Annotations
@Deprecated
_collatorsback to summary
protected Collator[] _collators
_domback to summary
private DOM _dom
_lastback to summary
private int _last
_localeback to summary
protected Locale _locale

Deprecated

This field continues to exist for binary compatibility. New code should not refer to it.

A locale field that might be set by an instance of a subclass.

Annotations
@Deprecated
_nodeback to summary
private int _node
_scannedback to summary
private int _scanned
_settingsback to summary
protected SortSettings _settings
_valuesback to summary
private Object[] _values
COMPARE_ASCENDINGback to summary
public static final int COMPARE_ASCENDING
COMPARE_DESCENDINGback to summary
public static final int COMPARE_DESCENDING
COMPARE_NUMERICback to summary
public static final int COMPARE_NUMERIC
COMPARE_STRINGback to summary
public static final int COMPARE_STRING
DEFAULT_COLLATORback to summary
private static final Collator DEFAULT_COLLATOR

Deprecated

This field continues to exist for binary compatibility. New code should not refer to it.

A reference to a collator. May be updated by subclass if the stylesheet specifies a different language (will be updated iff _locale is updated).

Annotations
@Deprecated

Constructor Detail

NodeSortRecordback to summary
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().

NodeSortRecordback to summary
public NodeSortRecord()

Method Detail

compareDocOrderback to summary
public final int compareDocOrder(NodeSortRecord other)
compareToback to summary
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!!!!

Annotations
@SuppressWarnings:rawtypes, unchecked
extractValueFromDOMback to summary
public abstract String extractValueFromDOM(DOM dom, int current, int level, AbstractTranslet translet, int last)

Extract the sort value for a level of this key.

getCollatorback to summary
public Collator[] getCollator()

Returns the array of Collators used for text comparisons in this object. May be overridden by inheriting classes

getNodeback to summary
public final int getNode()

Returns the node for this sort object

initializeback to summary
public final void initialize(int node, int last, DOM dom, SortSettings settings) throws TransletException

This method allows the caller to set the values that could not be passed to the default constructor.

numericValueback to summary
private final Double numericValue(int level)
stringValueback to summary
private final Comparable<T> stringValue(int level)

Get the string or numeric value of a specific level key for this sort element. The value is extracted from the DOM if it is not already in our sort key vector.

Annotations
@SuppressWarnings:rawtypes