|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.examples.APIExamples
public class APIExamples
All the methods in this class highlight some are of the API and how to use it.
for license details.
The copyright to this program is held by it's authors.
Nested Class Summary | |
---|---|
(package private) static class |
APIExamples.MyBookFilter
A simple BookFilter that looks for a Bible by name. |
(package private) static class |
APIExamples.MyBooksListener
A simple BooksListener that actually does nothing. |
Field Summary | |
---|---|
private static String |
BIBLE_NAME
The name of a Bible to find |
Constructor Summary | |
---|---|
APIExamples()
|
Method Summary | |
---|---|
Book |
getBook(String bookInitials)
Get a particular installed book by initials. |
SAXEventProvider |
getOSIS(String bookInitials,
String reference,
int maxKeyCount)
Obtain a SAX event provider for the OSIS document representation of one or more book entries. |
String |
getPlainText(String bookInitials,
String reference)
Get just the canonical text of one or more book entries without any markup. |
void |
installBook()
|
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. |
String |
readStyledText(String bookInitials,
String reference,
int maxKeyCount)
Obtain styled text (in this case HTML) for a book reference. |
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 |
---|
private static final String BIBLE_NAME
Constructor Detail |
---|
public APIExamples()
Method Detail |
---|
public Book getBook(String bookInitials)
bookInitials
- The book name to search for
public String getPlainText(String bookInitials, String reference) throws BookException, NoSuchKeyException
bookInitials
- the book to usereference
- a reference, appropriate for the book, of one or more entries
BookException
NoSuchKeyException
public SAXEventProvider getOSIS(String bookInitials, String reference, int maxKeyCount) throws BookException, NoSuchKeyException
bookInitials
- the book to usereference
- a reference, appropriate for the book, of one or more entries
BookException
NoSuchKeyException
public String readStyledText(String bookInitials, String reference, int maxKeyCount) throws NoSuchKeyException, BookException, TransformerException, SAXException
bookInitials
- the book to usereference
- a reference, appropriate for the book, of one or more entries
NoSuchKeyException
BookException
TransformerException
SAXException
Book
,
SAXEventProvider
public void readDictionary() throws BookException
BookException
Book
public void search() throws BookException
BookException
void rankedSearch() throws BookException
BookException
void searchAndShow() throws BookException, SAXException
BookException
SAXException
public void pickBible()
Config
,
Books
public void installBook()
public static void main(String[] args) throws BookException, NoSuchKeyException, TransformerException, SAXException
NoSuchKeyException
BookException
SAXException
TransformerException
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |