JSword
  1. JSword
  2. JS-234

Some non-KJV versified passages can not be read

    Details

      Description

      When reading from non-KJV Bible modules sometimes the text is not returned but instead an exception results. This is seen in Bible Desktop when trying to read IBT's UZV (Uzbek) module Ps 117:1-29.

      A patch for JSword is attached. The Verse class was not maintaining
      its own versification value and so it was impossible for Verse to
      operate properly in some circumstances.

      The crux of the problem is seen in:
      org.crosswire.jsword.passage.
      Passage.getPassage(Key),
      where Passage maintains its own versification value, but (Verse) Key
      did not. So it was impossible to insure correct construction of a
      Passage from an arbitrary Verse Key (all Passages returned were being
      KJV versified even if the Verse was not KJV). This led to incorrect
      Passage assignments and unhandled exceptions (such as when viewing
      IBT's UZV module Ps 117:1-29).

      The patch requires a Versification when instantiating any Verse class, and then that value is retained within the Verse key along with book, chapter and verse. A method was added called Verse.getVersification(). Also, to fix the above mentioned bug, Passage.getPassage(Key) now casts the Key as Verse, and if successful, it reads the Verse's Versification to pass it along to PassageKeyFactory.getKey(), thus enabling the resulting Passage to have the correct Versification and value.

      This fix is also logically necessary since Verse points to an actual
      Bible verse, and the versification is a necessary part of any actual
      Bible address location.

      I tested this patch with common-junit-alltests and everything passed
      expect 4 failures related to Lucene stemming and stop-words. These
      seem to be related to the Lucene version and appear totally unrelated
      related to Verse Key. I also tested a bit with Bible-Desktop.

        Activity

        Hide
        DM Smith added a comment -

        I applied the logic in the patch. The Verse class had changed too much for it to apply cleanly.

        I put the Versification argument before Book as it logically precedes it.

        I'll be putting up a pull request to github.com/crosswire/jsword shortly.

        Show
        DM Smith added a comment - I applied the logic in the patch. The Verse class had changed too much for it to apply cleanly. I put the Versification argument before Book as it logically precedes it. I'll be putting up a pull request to github.com/crosswire/jsword shortly.

          People

          • Assignee:
            DM Smith
            Reporter:
            John Austin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: