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

All Implemented Interfaces:
  BookProvider

    public class BookData

extends Object
implements BookProvider

BookData is the assembler of the OSIS that is returned by the filters. As such it puts that into an OSIS document. When several books are supplied, it gets the data from each and puts it into a parallel or interlinear view. Note: it is critical that all the books are able to understand the same key. That does not mean that each has to have content for each key. Missing keys are represented by empty cells.

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

Field Summary
`private Book[]` | `books` The books to which the key should be applied.
`private boolean` | `comparingBooks` Whether the Books should be compared.
`private org.jdom.Element` | `fragment` Just the element
`private Key` | `key` What key was used to create this data
`private org.jdom.Element` | `osis` The complete OSIS container for the element

Constructor Summary
`BookData(Book[] books, Key key, boolean compare)` Create BookData for multiple books.
`BookData(Book book, Key key)` Ctor

Method Summary
`Book[]` | `getBooks()` Who created this data.
`Book` | `getFirstBook()` Get the first book.
`Key` | `getKey()` The key used to obtain data from one or more books.
`org.jdom.Element` | `getOsis()` Accessor for the root OSIS element
`private org.jdom.Element` | `getOsisContent()`
`org.jdom.Element` | `getOsisFragment()` Accessor for the root OSIS element
`SAXEventProvider` | `getSAXEventProvider()` Output the current data as a SAX stream.
`boolean` | `isComparingBooks()`

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

Field Detail

### key

    private Key key

  What key was used to create this data

### books

    private Book[] books

  The books to which the key should be applied.

### comparingBooks

    private boolean comparingBooks

  Whether the Books should be compared.

### osis

    private org.jdom.Element osis

  The complete OSIS container for the element

### fragment

    private org.jdom.Element fragment

  Just the element

Constructor Detail

### BookData

    public BookData(Book book,
                    Key key)

  Ctor

### BookData

    public BookData(Book[] books,
                    Key key,
                    boolean compare)

  Create BookData for multiple books.

Method Detail

### getOsis

    public org.jdom.Element getOsis()
                             throws BookException

  Accessor for the root OSIS element

  Throws:
    `BookException`

### getOsisFragment

    public org.jdom.Element getOsisFragment()
                                     throws BookException

  Accessor for the root OSIS element

  Throws:
    `BookException`

### getSAXEventProvider

    public SAXEventProvider getSAXEventProvider()
                                         throws BookException

  Output the current data as a SAX stream.

  Returns:
    A way of posting SAX events
  Throws:
    `BookException`

### getBooks

    public Book[] getBooks()

  Who created this data.

  Specified by:
    `getBooks` in interface `BookProvider`
  Returns:
    Returns the book.

### getFirstBook

    public Book getFirstBook()

  Get the first book.

  Specified by:
    `getFirstBook` in interface `BookProvider`
  Returns:
    the first book

### getKey

    public Key getKey()

  The key used to obtain data from one or more books.

  Returns:
    Returns the key.

### isComparingBooks

    public boolean isComparingBooks()

  Returns:
    whether the books should be compared.

### getOsisContent

    private org.jdom.Element getOsisContent()
                                     throws BookException

  Throws:
    `BookException`

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