|
|||||||||
| Home >> All >> com >> eireneh >> bible >> passage >> [ swing overview ] | PREV PACKAGE NEXT PACKAGE | ||||||||
Package com.eireneh.bible.passage.swing
The core responsibility of the passage package is to store and collate information about the structure of the Bible - The most important classes arePassage, PassageTally and Strongs.
See:
Description
| Class Summary | |
| BibleTreeNode | BibleTreeNode. |
| BookTreeNode | PassageTableModel. |
| ChapterTreeNode | PassageTableModel. |
| PassageList | A Simple extension to JList to customize it to hold a Passage and provide Passage related actions. |
| PassageListCellRenderer | Renders a Passage in a JList. |
| PassageListModel | The PassageListModel class gives access to a Passage via a ListModel. |
| PassageTreeModel | The PassageTreeModel class implements TreeModel using various custom TreeNodes, and simply extending DefaultTreeModel. |
| PassageTreeNode | A PassageTreeNode extends TreeNode to Model a Passage. |
| VerseRangeTreeNode | BibleTreeNode. |
| VerseTreeNode | PassageTableModel. |
Package com.eireneh.bible.passage.swing Description
The core responsibility of the passage package is to
store and collate information about the structure of the Bible - The most
important classes are Passage, PassageTally and Strongs. A Passage stores lists of
verses, for example"Gen 1:1-5, 10". PassageTally is similar but stores verses ordered by
a tally against each verse. A Strongs
represents a Greek or Hebrew word as categorized by James Strong.
Passage
A Passage is modeled
after the JDK 2.0 Collections interface - so
all the usual add(), remove() type actions are available. (A PassageCollection proxy class is available in order to treat a Passage exactly like a Collection)
In addition to this a Passage will do:
- List blurring (for find X within 5 verses of Y type requests)
- List change notification, so you can register to
receive notification of changes to a
Passage. This will be of most use with a multi-threaded search engine. - An understanding of VerseRanges (see below) for range counting and iteration (in addition to Verse counting etc)
The Passage interface
uses Verse and VerseRange in many of its methods. A Verse is obvious - a single Bible verse e.g. "Exo 2:4", or "Jude 4". A VerseRange has a start Verse and an end Verse
e.g. "Exo 3:5-7", or "Mat 25:1-Mar 2:4".
Verse and VerseRange have a superclass interface of VerseBase, and this interface is collected and sorted
by Passage .So an example Passage is "Exo 2:4, 3:5-7, Mat
25:1-Mar 2:4, Jude 4".
The Passage interface is
implemented by 3 concrete classes - DistinctPassage is a simple sorted collection of Verses, RangedPassage is a sorted
collection of VerseRanges, and BitwisePassage uses an array - essentially boolean[31104] to specify whether a verse is a member
of the Passage. Obviously each of these
implementations has different strengths, which the user should not need to be
bothered with. So the PassageFactory class is
responsible for creating Passages of a suitable
type.
PassageTally
The PassageTally class
is-a to Passage however it's job is to store a
rank to a Verse. This is for a best-match type
application - "find the verse that best matches these words". It is my
intent to marry this with a Thesarus interface, because my most common gripe
with the OLB is that I search for "God & loves & world" and
expect to find John 3:16, but the search fails because John 3:16 uses the word
"loved" and not "loves".
The final aim is a fuzzy matching scheme to I can search for "God loves us and gave Jesus to save us" and correctly be told John 3:16.
Strongs
The Strongs class
represents a Hebrew or Greek word, or a parsing number indicating the way the
verse is aimed.
Other Stuff
This package has a SelfTest class that is designed to stress every line of code in the
rest of the package to make it bug-free. Otherwise this package is largely
complete. I still need to inspect [Bitwise|Distinct|Ranged]Passage and
PassageTally
|
|||||||||
| Home >> All >> com >> eireneh >> bible >> passage >> [ swing overview ] | PREV PACKAGE NEXT PACKAGE | ||||||||