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.book
Class BookData

    java.lang.Object
      org.crosswire.jsword.book.BookData

    public class BookData

extends Object

Basic section of BookData.

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 Book` | `book` Who created this data
`private Key` | `key` What key was used to create this data
`private org.jdom.Element` | `osis` The root where we read data from

Constructor Summary
`BookData(org.jdom.Element osis, Book book, Key key)` Ctor
`BookData(SAXEventProvider provider, Book book, Key key)` Create a BibleData from a SAXEventProvider

Method Summary
`Book` | `getBook()` Who created this data.
`Key` | `getKey()` What key was used to create this data.
`org.jdom.Element` | `getOsis()` Accessor for the root OSIS element
`String` | `getPlainText()` A simplified plain text version of the data in this document with all the markup stripped out.
`SAXEventProvider` | `getSAXEventProvider()` Output the current data as a SAX stream.
`String` | `getVerseText()` Return the verse's text without any extra-biblical material.
`void` | `validate()` Check that a BibleData is valid.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### book

    private Book book

  Who created this data

### key

    private Key key

  What key was used to create this data

### osis

    private org.jdom.Element osis

  The root where we read data from

Constructor Detail

### BookData

    public BookData(org.jdom.Element osis,
                    Book book,
                    Key key)

  Ctor

### BookData

    public BookData(SAXEventProvider provider,
                    Book book,
                    Key key)
             throws SAXException

  Create a BibleData from a SAXEventProvider

  Throws:
    `SAXException`

Method Detail

### getOsis

    public org.jdom.Element getOsis()

  Accessor for the root OSIS element

### getVerseText

    public String getVerseText()

  Return the verse's text without any extra-biblical material.

  Returns:
    The Bible text without markup

### getPlainText

    public String getPlainText()

  A simplified plain text version of the data in this document with all the markup stripped out. This is not as simple as it seems. TODO(DMS): push this into OSISUtil

  Returns:
    The text without markup

### validate

    public void validate()

  Check that a BibleData is valid. Currently, this does nothing, and isn't used. it was broken when we used JAXB, however it wasn't much use then becuase JAXB did a lot to keep the document valid anyway. Under JDOM there is more point, but I don't think JDOM supports this out of the box.

### getSAXEventProvider

    public SAXEventProvider getSAXEventProvider()

  Output the current data as a SAX stream.

  Returns:
    A way of posting SAX events

### getBook

    public Book getBook()

  Who created this data.

  Returns:
    Returns the book.

### getKey

    public Key getKey()

  What key was used to create this data. It should be true that bookdata.getBook().getBookData(bookdata.getKey()) equals (but not necessarily ==) the original bookdata.

  Returns:
    Returns the key.

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