org.crosswire.jsword.book.sword
Class ConfigEntryTable

java.lang.Object
  extended by org.crosswire.jsword.book.sword.ConfigEntryTable

public final class ConfigEntryTable
extends Object

A utility class for loading the entries in a Sword book's conf file. Since the conf files are manually maintained, there can be all sorts of errors in them. This class does robust checking and reporting.

Config file format. See also: http://sword.sourceforge.net/cgi-bin/twiki/view/Swordapi/ConfFileLayout

The contents of the About field are in rtf.

\ is used as a continuation line.

Author:
Mark Goodwin, Joe Walker, Jacky Cheung, DM Smith
See Also:
The GNU Lesser General Public License for details.
The copyright to this program is held by its authors.

Field Summary
private  String initials
          The set of initials identifying this book
 
Constructor Summary
ConfigEntryTable(String bookName, boolean isRootConfig)
          Create an empty Sword config for the named book.
ConfigEntryTable(String bookName, boolean isRootConfig, String initials)
          Sometimes, we're creating the config off another config, and so need to ensure the initials match exactly.
 
Method Summary
 String toConf()
          Build's a SWORD conf file as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initials

private String initials
The set of initials identifying this book

Constructor Detail

ConfigEntryTable

public ConfigEntryTable(String bookName,
                        boolean isRootConfig)
Create an empty Sword config for the named book.

Parameters:
bookName - the name of the book
isRootConfig - true to indicate a root configuration

ConfigEntryTable

public ConfigEntryTable(String bookName,
                        boolean isRootConfig,
                        String initials)
Sometimes, we're creating the config off another config, and so need to ensure the initials match exactly.

Parameters:
bookName - the name of the book
isRootConfig - true to indicate a root configuration
initials - the set of initials used to identify this module. This could be different to the bookName (which may be lowercase)
Method Detail

toConf

public String toConf()
Build's a SWORD conf file as a string. The result is not identical to the original, cleaning up problems in the original and re-arranging the entries into a predictable order.

Returns:
the well-formed conf.

Copyright ยจ 2003-2015