[jsword-devel] Patch for incremental improvements

DM Smith dmsmith555 at yahoo.com
Tue Aug 24 18:39:02 MST 2004


Here is the patch I outlined in the previous e-mail message. I have 
tested it with my ad-hoc testing, w/ all the j-unit tests and all the 
"tools" to uncover what I can. This is a significant change at the heart 
of JSword so I have been a lot more thorough w/ testing.

Hope you like the change. I find that using the Type Safe Enumeration 
pattern and Command pattern combined, results in simpler, easier to 
maintain code, that is a touch harder to understand at first glance.

In the case of AccuracyType, it implements a finite state automata in an 
OO kind of way. The basic idea is that once you have an AccuracyType it 
can construct a start verse of a verse range, and once you have an start 
verse it can construct an end verse. Since verse specifications can have 
various degrees of accuracy, it is necessary to disambiguate with a 
prior verse range. Note, that the first verse in a verse range list does 
not have context of a prior verse range, so some kinds of inaccuracy are 
not allowed for a first verse or first verse range. (I forgot to mention 
that this is a difference, where before it would use Gen 1.1 for the 
"first")

This will be my last patch before 0.9.8, unless there is something 
specific I should fix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-type.zip
Type: application/x-zip-compressed
Size: 54038 bytes
Desc: not available
Url : http://www.crosswire.org/pipermail/jsword-devel/attachments/20040824/8f37a20f/patch-type-0001.bin


More information about the jsword-devel mailing list