[jsword-devel] Alternate Verification (was Re: step build: error on step-core)
dmsmith at crosswire.org
Wed Feb 8 06:40:36 MST 2012
Peter is correct. The av11n changes are not backward compatible. As we move to av11n, the code in trunk is also unstable.
The PassageKeyFactory no longer implements KeyFactory. The simplest change is to do the following:
KeyFactory kf = new PassageKeyFactory();
PassageKeyFactory kf = new PassageKeyFactory();
The purpose of the PassageKeyFactory is to construct a Passage of a given space/time performance implementation as specified in global startup properties.
The issue is that a Passage, which relies on a mapping of Book/Chapter/Verse (bcv) to ordinal value, can only be understood in light of the Book's versification. So now all of the routines that construct a Passage have to have a v11n.
The Versification is what holds the knowledge of this mapping.
The other major change is that all calculations regarding two verses is moving to the Versification classes. This changes VerseRange (while not a Passage, it is very much like a Passage) to take a v11n as part of the constructors. And it deprecates lots of methods in VerseRange.
It also changes Verse, with many deprecations. I'm trying to avoid having a v11n be part of a Verse and have it only a dumb holder of BibleBook, chapter, and verse.
You'll see that org.crosswire.jsword.versification.BibleInfo as a class is deprecated. It was hard-coded to return answers for the KJV versification. Rather than BibleInfo, one should use:
as an equivalent. Ultimately, the "KJV" will need to be replace with a call to get the versification from the Book's BookMetaData.
The goal of org.crosswire.jsword.versification.system.Versifications is to be lazy wrt construction of a v11n. It only fluffs the definition of the v11n if it is needed.
The other big change is that there JSword now specifically supports Chapter 0 and Verse 0 for introductions. I've also added three new BibleBooks to support Book and Testament introductions. This can be surprising.
For the most part the job is merely getting the code to compile, eliminating deprecations and not using "KJV" v11n.
One area that needs special attention is anywhere that iterates through BibleBooks. That code will need to change. One way to do this is to search for all instances of BibleBook.GEN, BibleBook.MAL, BibleBook.MATT and BibleBook.REV.
I'm still improving the testing of the changes, but at the moment all tests pass.
At this time, SectionNames still needs to be changed and Verse will probably change (at least to fill out the deprecations).
If you decide to upgrade STEP to use JSword trunk, feel free to ask for help here and to report your findings.
Hope this helps.
In His Service,
On Feb 8, 2012, at 7:40 AM, Peter von Kaehne wrote:
> There is at this very moment a major drive to fix jsword to make it
> compatible to alternative versification systems (av11n) as we use
> already in libsword.
> I would guess the error you found is to do with that - Step relying on
> an older version of jsword. Maybe check out an earlier version and see
> if it compiles. DM started to check in av11n stuff in jsword only a
> month or so.
> On 08/02/12 03:21, erick4j wrote:
>> I followed instructions from:
>> Both (jsword & step) were fresh checkouts from trunk. Any thoughts how
>> to resolve this. Thanks!
>> incompatible types
>> [ERROR] found : org.crosswire.jsword.passage.PassageKeyFactory
>> [ERROR] required: org.crosswire.jsword.passage.KeyFactory
>> jsword-devel mailing list
>> jsword-devel at crosswire.org
> jsword-devel mailing list
> jsword-devel at crosswire.org
More information about the jsword-devel