org.crosswire.jsword.examples
Class APIExamples

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

public class APIExamples
extends Object

All the methods in this class highlight some are of the API and how to use it.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: APIExamples.java,v 1.20 2005/03/19 01:56:47 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
private static String BIBLE_NAME
          The name of a Bible to find
 
Constructor Summary
APIExamples()
           
 
Method Summary
static void main(String[] args)
          Quick Demo
 void pickBible()
          This is an example of the different ways to select a Book from the selection available.
 void readDictionary()
          While Bible and Commentary are very similar, a Dictionary is read in a slightly different way.
 void readPlainText()
          The source to this method is an example of how to read the plain text of a verse, and print it to stdout.
 void readStyledText()
          This method demonstrates how to get styled text (in this case HTML) from a verse, and print it to stdout.
 void search()
          An example of how to search for various bits of data.
 
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
Constructor Detail

APIExamples

public APIExamples()
Method Detail

readPlainText

public void readPlainText()
                   throws BookException,
                          NoSuchKeyException
The source to this method is an example of how to read the plain text of a verse, and print it to stdout. Reading from a Commentary is just the same as reading from a Bible.

Throws:
BookException
NoSuchKeyException
See Also:
Book

readStyledText

public void readStyledText()
                    throws NoSuchKeyException,
                           BookException,
                           TransformerException,
                           SAXException
This method demonstrates how to get styled text (in this case HTML) from a verse, and print it to stdout. Reading from a Commentary is just the same as reading from a Bible.

Throws:
NoSuchKeyException
BookException
TransformerException
SAXException
See Also:
Book, SAXEventProvider

readDictionary

public void readDictionary()
                    throws BookException
While Bible and Commentary are very similar, a Dictionary is read in a slightly different way. It is also worth looking at the JavaDoc for Book that has a way of treating Bible, Commentary and Dictionary the same.

Throws:
BookException
See Also:
Book

search

public void search()
            throws BookException
An example of how to search for various bits of data.

Throws:
BookException

pickBible

public void pickBible()
This is an example of the different ways to select a Book from the selection available.

See Also:
Config, Books

main

public static void main(String[] args)
                 throws Exception
Quick Demo

Throws:
Exception

Copyright ? 2003-2004