[jsword-devel] JSword global/statics

DM Smith dmsmith at crosswire.org
Wed Mar 13 18:37:03 MST 2013


There are a few globals that are used by the program to change user visible default behavior. These were designed for per user setting, but they really are per application.

I'd like to know if they are in use by other applications and if not whether the app has a different way of performing the same behavior.

They were put into JSword in the hopes that they'd be useful to most if not all apps.

o.c.jsword.book.Defaults defines default books of different types:
	Bible (either a particular Bible or the last Bible used.)
	Commentary
	Daily Devotional
	Dictionary
	Greek Parsing Dictionary
	Greek Strong's Number Dictionary
	Hebrew Parsing Dictionary (there aren't any at this time)
	Hebrew Strong's Number Dictionary
JSword does not use this internally.

o.c.jsword.book.BookFilters allows a static setting of "commentaries with bibles" that affects whether BookFilters.getBibles() or getNonBibles() returns a filter regarding just Bibles or Bibles and Commentaries.
JSword doesn't use this internally.

o.c.jjsword.book.sword.SwordBookPath allows the setting of the location to which Books (aka modules) should be downloaded and allows for additional locations to be added for finding Books.
This is used internally by JSword.

o.c.jsword.passage.PassageUtil defines whether a Verse, VerseRange or Passage should retain the string input from which it was created and return it when getName() is called.
This is used internally by JSword.
The default is to not use the original (however the original is stored in the Verse, VerseRange and Passage).

o.c.jsword.passage.RestrictionType defines whether blurring (expanding a Verse, VerseRange or Passage by n Verses) should be constrained to chapters or not be constrained at all. (We used to allow constraining to Bible book).
This is used internally by JSword in a query.
Moses ~3 Aaron will find all the verses with Moses and those with Aaron. Then it blurs those with Moses by the requested amount. Then it will take the intersection of the two. Basically it is "Find Aaron with in 3 verses of Moses"
We could move this into o.c.jsword.index.search.SearchModifier and DefaultSearchModifier.
Note, this is not a feature provided by Lucene, but one we layer on top of Lucene.

o.c.common.util.Translations contains a list of languages into which JSword (and BibleDesktop) have been translated. There's the ability to set the Global Language for the application.
JSword doesn't use this internally.

o.c.jsword.versificaiton.BookName has two static/global properties. One for whether a Book name is to be left as found in BibleNames.properties, usually Title Case, changed to UPPER case or to lower case. The other allows for the setting whether getPreferredName returns getLongName or getShortName.
JSword uses this via BookName.toString(), which may be used all over JSword, but is hard to tell.

o.c.jsword.passage.PassageKeyFactory Allows for the picking of a default type of passage. This is not meant to be user visible, but it impacts time/space considerations.
JSword uses this.

A few others:
Font set on a Language or Book
Cipher set on a Locked Book
WebWarning (user can dismiss a Web Warning and store that decision)





More information about the jsword-devel mailing list