/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: NodeSortRecord.java,v 1.5 2005/09/28 13:48:36 pvedula Exp $
*/
/**
* Base class for sort records containing application specific sort keys
*/
public abstract class NodeSortRecord {
/**
* A reference to a collator. May be updated by subclass if the stylesheet
* specifies a different language (will be updated iff _locale is updated).
* @deprecated This field continues to exist for binary compatibility.
* New code should not refer to it.
*/
/**
* A reference to the first Collator
* @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.
* @deprecated This field continues to exist for binary compatibility.
* New code should not refer to it.
*/
/**
* 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().
*/
}
public NodeSortRecord() {
this(0);
}
/**
* This method allows the caller to set the values that could not be passed
* to the default constructor.
*/
throws TransletException
{
try {
// -- W. Eliot Kimber (eliot@isogen.com)
}
catch (SecurityException e) {
// If we can't read the propery, just use default collator
}
if (colFactClassname != null) {
try {
} catch (ClassNotFoundException e) {
throw new TransletException(e);
}
for (int i = 0; i < levels; i++){
}
} else {
}
}
/**
* Returns the node for this sort object
*/
public final int getNode() {
return _node;
}
/**
*
*/
}
/**
* 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.
*/
// Get value from our array if possible
// Get value from DOM if accessed for the first time
final Comparable key =
return(key);
}
}
// Get value from our vector if possible
// Get value from DOM if accessed for the first time
try {
}
// Treat number as NaN if it cannot be parsed as a double
catch (NumberFormatException e) {
}
return(num);
}
}
/**
* 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!!!!
*/
// Compare the two nodes either as numeric or text values
}
else {
}
// Return inverse compare value if inverse sort order
if (cmp != 0) {
}
}
// Compare based on document order if all sort keys are equal
}
/**
* Returns the array of Collators used for text comparisons in this object.
* May be overridden by inheriting classes
*/
return _collators;
}
/**
* Extract the sort value for a level of this key.
*/
int last);
}