Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.examples
Class APIExamples

    java.lang.Object
      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.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`private static String` | `BIBLE_NAME` The name of a Bible to find

Constructor Summary
`APIExamples()`

Method Summary
`void` | `export()` An example of how to get the text of a book for export.
`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.
`(package private) void` | `rankedSearch()` An example of how to perform a ranked search.
`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.
`(package private) void` | `searchAndShow()` An example of how to do a search and then get text for each range of verses.

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`

### rankedSearch

    void rankedSearch()
                throws BookException

  An example of how to perform a ranked search.

  Throws:
    `BookException`

### searchAndShow

    void searchAndShow()
                 throws BookException,
                        SAXException

  An example of how to do a search and then get text for each range of verses.

  Throws:
    `BookException`
    `SAXException`

### export

    public void export()
                throws NoSuchKeyException,
                       BookException

  An example of how to get the text of a book for export.

  Throws:
    `NoSuchKeyException`
    `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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD