Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.eireneh.bible.book
Interface Book  view Book download Book.java

All Known Subinterfaces:
Bible, StudyBible
All Known Implementing Classes:
AbstractBible

public interface Book

Book is the most basic store of textual data - It can retrieve data either as an XML document or as plain text - It uses Bookmarks to refer to parts of itself, and can search for words (returning Bookmarks).

All Books should have an no-arg constructor. This restriction is important because without this the config package can not create an instance of this class from a string in an options file.

What type should we use to describe a part of a book that we want to wiew? This question is made more complex because a find() operation needs to be able to return a collection of pointers.

What type should we use to pass around DOM Documents? The options seem to be:

  • BlahDOM: This biggest problem with this is that it makes access to the data more complex. It could allow is to store a 'current node' pointer which could be useful. This is the best method

    Each Book needs a GUI to select a Bookmark for viewing. The GUI layout is very Book dependant however, we do not want to put GUI dependancies into non-GUI code, so there is no Component getSelector() interface. Maybe a Class getGUISelector() interface would be better? or we could have a convention like .swing.Selector

    We also need to consider handling DOMs

     interface BaseDOM
     {
         public Document getDom();
    
         public DTD getDTD();
         public void setDTD(DTD dtd);
     }
    
     // Consider THML when thinking about the DTD
     class BookDOM extends BaseDOM
     {
         public String getText();
     }
     

    Distribution Licence:
    Project B 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, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
    The copyright to this program is held by it's authors.

    Version:
    D0.I0.T0