[sword-devel] JSword documentation correction required?
DM Smith
dmsmith at crosswire.org
Fri Jul 16 11:24:30 MST 2010
On 07/16/2010 12:41 PM, Chris Burrell wrote:
> Hi all
>
> The documentation of Key.getName() suggests that getName() will
> return the short name, such as Mat 1:1 but in fact, when I was just
> using it out of the box, I got Matthew 1:1 instead!
>
>
> Books.installed().getBook(version).getKey(reference).getName();
Well, the documentation doesn't match. That's a bug either in the docs
or in the implementation. But you saw that :-P
>
> But I've found, that we have to set BibleInfo.setFullBookName(false);
> first, for this to end up in short names.
The other setting that gets in the way is
PassageUtil.setPersistentNaming(boolean persistentNaming), which will
preserve whatever the verse was parsed from.
> Not being completely familiar with the whole JSword framework, does
> this have other implications given this is a static assignment? In
> particular for concurrency/multi user environment for example?
You are right that global statics are generally an issue for
concurrency/multi-user code.
JSword and BibleDesktop have a bunch of global statics. These are part
of the preferences mechanism. They are exposed in BibleDesktop under
Options (Preferences on the Mac).
Those that are part of the jsword.jar or the jsword-common.jar may be
problematic for you. BibleDesktop has some that won't bother you.
It probably would be good to figure out a better mechanism to handle
preferences or to avoid statics.
>
> Does this affect the passage lookup mechanism too? for the title tag
> for example? or is taken straight from the Sword module, and therefore
> this wouldn't affect it...?
It affects the title tag that the filters and xslt generates. Some of
the book names are taken straight from the Sword module and are left as is.
Can you suggest a better mechanism?
> Just wondering...
>
> The interface in question is Key.java.
By the way sword-devel is not the appropriate place to discuss JSword.
jsword-devel is. :)
In Him,
DM
More information about the sword-devel
mailing list