Package org.crosswire.jsword.passage

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.

See: Description

Package org.crosswire.jsword.passage 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:

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 the intent to marry this with a Thesarus interface, because a 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.

Copyright ยจ 2003-2015