org.crosswire.jsword.examples
Class BibleToOsis

java.lang.Object
  extended by org.crosswire.jsword.examples.BibleToOsis

public class BibleToOsis
extends Object

Start of a mechanism to extract a Bible module to OSIS.

Author:
DM Smith
See Also:
The GNU Lesser General Public License for details.

Field Summary
private static String BIBLE_NAME
          The name of a Bible to find
private static String BIBLE_RANGE
           
private static boolean BY_BOOK
           
private  String filename
           
private static FieldPosition pos
           
private static String preVerseElement
           
private static Pattern preVersePattern
           
private static String preVerseStart
           
private static String psalmTitleElement
           
private static Pattern psalmTitlePattern
           
private static String psalmTitleStart
           
private  Writer writer
           
 
Constructor Summary
BibleToOsis()
           
 
Method Summary
private  void buildBookClose(StringBuffer buf)
           
private  void buildBookOpen(StringBuffer buf, String bookName)
           
private  void buildChapterClose(StringBuffer buf)
           
private  void buildChapterOpen(StringBuffer buf, String bookName, int chapter)
           
private  void buildDocumentClose(StringBuffer buf, boolean force)
           
private  void buildDocumentOpen(StringBuffer buf, BookMetaData bmd, String range, boolean force)
           
private  void buildPreVerseClose(StringBuffer buf)
           
private  void buildPreVerseOpen(StringBuffer buf, String preVerse)
           
private  void buildPsalmTitle(StringBuffer buf, String psalmTitle)
           
private  void buildVerseClose(StringBuffer buf, String osisID)
           
private  void buildVerseOpen(StringBuffer buf, String osisID)
           
private  void closeOutputFile(boolean close)
           
 void dump(String name, String range)
           
static void main(String[] args)
           
private  void openOutputFile(String newFilename, boolean open)
           
private  void parse()
           
private  void writeDocument(StringBuffer buf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIBLE_NAME

private static final String BIBLE_NAME
The name of a Bible to find

See Also:
Constant Field Values

BIBLE_RANGE

private static final String BIBLE_RANGE
See Also:
Constant Field Values

BY_BOOK

private static final boolean BY_BOOK
See Also:
Constant Field Values

pos

private static FieldPosition pos

preVerseStart

private static String preVerseStart

preVerseElement

private static String preVerseElement

preVersePattern

private static Pattern preVersePattern

psalmTitleStart

private static String psalmTitleStart

psalmTitleElement

private static String psalmTitleElement

psalmTitlePattern

private static Pattern psalmTitlePattern

writer

private Writer writer

filename

private String filename
Constructor Detail

BibleToOsis

public BibleToOsis()
Method Detail

main

public static void main(String[] args)
Parameters:
args -

dump

public void dump(String name,
                 String range)
          throws NoSuchKeyException,
                 IOException,
                 BookException
Throws:
NoSuchKeyException
IOException
BookException

buildDocumentOpen

private void buildDocumentOpen(StringBuffer buf,
                               BookMetaData bmd,
                               String range,
                               boolean force)

buildDocumentClose

private void buildDocumentClose(StringBuffer buf,
                                boolean force)

buildBookOpen

private void buildBookOpen(StringBuffer buf,
                           String bookName)

buildBookClose

private void buildBookClose(StringBuffer buf)

buildChapterClose

private void buildChapterClose(StringBuffer buf)

buildChapterOpen

private void buildChapterOpen(StringBuffer buf,
                              String bookName,
                              int chapter)

buildPsalmTitle

private void buildPsalmTitle(StringBuffer buf,
                             String psalmTitle)

buildPreVerseOpen

private void buildPreVerseOpen(StringBuffer buf,
                               String preVerse)

buildPreVerseClose

private void buildPreVerseClose(StringBuffer buf)

buildVerseOpen

private void buildVerseOpen(StringBuffer buf,
                            String osisID)

buildVerseClose

private void buildVerseClose(StringBuffer buf,
                             String osisID)

openOutputFile

private void openOutputFile(String newFilename,
                            boolean open)
                     throws IOException
Throws:
IOException

writeDocument

private void writeDocument(StringBuffer buf)
                    throws IOException
Throws:
IOException

closeOutputFile

private void closeOutputFile(boolean close)
                      throws IOException
Throws:
IOException

parse

private void parse()

Copyright ยจ 2003-2015