|
|||||||||
| Home >> All >> com >> eireneh >> bible >> [ book overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.eireneh.bible.book
Interface Book

- 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.
- String: This is simple, however the requirement to allow transfer of several pointers in a single String means using delimitters, which make Books un-necessarily more complex.
- String[]: This may be a simpler solution, however it does not work well with Passage, and it specifies the collection method
- Collection: Enforces JDK 1.2 dependancy, and is not clearly typed
which means that to work with Passage we would need somthing like
Vector find()andPassage findRef(). - Bookmark[]: See problems for String[]
- Bookmarks: Works well with Passage (Passage extends Bookmarks and Verse and VerseRange extend Bookmark) and it lets the implementor choose the implementation. This is the best method
What type should we use to pass around DOM Documents? The options seem to be:
- Document: Just use the basic
org.w3c.dom.Documenttype This is fairly simple, although it increases dependacies on outside code (slightly) It is effectively a weak type, since a Document could contain anything.
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
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
|
|||||||||
| Home >> All >> com >> eireneh >> bible >> [ book overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC