com.isogen.indexhelper
Class IndexHelper

java.lang.Object
  extended bycom.isogen.indexhelper.IndexHelper

public class IndexHelper
extends java.lang.Object

Version:
$Revision: 1.1.1.1 $ Provides services that support the generation of back-of-the-book indexes.

Constructor Summary
IndexHelper()
           
IndexHelper(java.lang.String configFilename)
          Construct new indexHelper with configuration.
 
Method Summary
 java.lang.String getGroupKey(java.lang.String langCode, java.lang.String indexEntry)
          Returns the group key for the index group the indexEntry sorts within.
 java.lang.String getGroupLabel(java.lang.String langCode, java.lang.String groupKey)
          Given a group key, returns the groups display label string.
 java.lang.String getGroupSortKey(java.lang.String langCode, java.lang.String groupKey)
          Given a group key, returns the group sort key, that is, the key that the index style sheet uses to sort the groups in presentation order.
 java.util.Iterator getIndexGroupKeysIterator(java.lang.String langCode)
           
 void loadIndexRuleSetDoc(java.lang.String configFilename)
          Loads the specified index configuration file.
 java.lang.String printIndexRuleSet(java.lang.String langCode)
           
 java.lang.String printIndexRuleSet(java.lang.String langCode, boolean includeCollationRules)
           
 java.lang.String toString()
           
 java.lang.String toString(boolean includeCollationRules)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexHelper

public IndexHelper(java.lang.String configFilename)
            throws IndexHelperException
Construct new indexHelper with configuration.


IndexHelper

public IndexHelper()
Method Detail

loadIndexRuleSetDoc

public void loadIndexRuleSetDoc(java.lang.String configFilename)
                         throws IndexHelperException
Loads the specified index configuration file.

Parameters:
configFilename - Filename of the index configuration file.
Throws:
IndexHelperException

getIndexGroupKeysIterator

public java.util.Iterator getIndexGroupKeysIterator(java.lang.String langCode)
                                             throws IndexHelperException
Throws:
IndexHelperException

getGroupKey

public java.lang.String getGroupKey(java.lang.String langCode,
                                    java.lang.String indexEntry)
                             throws IndexHelperException
Returns the group key for the index group the indexEntry sorts within.

Parameters:
langCode - The language code for the output language.
indexEntry - The index entry for which the group key will be provided.
Throws:
IndexHelperException

getGroupLabel

public java.lang.String getGroupLabel(java.lang.String langCode,
                                      java.lang.String groupKey)
                               throws IndexHelperException
Given a group key, returns the groups display label string.

Parameters:
langCode - The language code for the index configuration.
groupKey - The sort key (as returned by getGroupKey()) for the group.
Throws:
IndexHelperException

getGroupSortKey

public java.lang.String getGroupSortKey(java.lang.String langCode,
                                        java.lang.String groupKey)
                                 throws IndexHelperException
Given a group key, returns the group sort key, that is, the key that the index style sheet uses to sort the groups in presentation order. This is usually the same as the sort key and the group label, but isn't always (e.g., Traditional Chinese).

Parameters:
langCode - The language code for the index configuration.
groupKey - The sort key (as returned by getGroupKey()) for the group.
Throws:
IndexHelperException

printIndexRuleSet

public java.lang.String printIndexRuleSet(java.lang.String langCode,
                                          boolean includeCollationRules)
                                   throws IndexHelperException
Throws:
IndexHelperException

printIndexRuleSet

public java.lang.String printIndexRuleSet(java.lang.String langCode)
                                   throws IndexHelperException
Throws:
IndexHelperException

toString

public java.lang.String toString()

toString

public java.lang.String toString(boolean includeCollationRules)