[jsword-devel] Bookmarks

DM Smith dmsmith at crosswire.org
Thu Mar 28 10:37:24 MST 2013


On Mar 28, 2013, at 10:24 AM, Martin Denham <mjdenham at gmail.com> wrote:

> I am struggling to think what to do with bookmarks wrt Versification since a Bookmark refers to all current Modules, possibly with different versifications.
> 
> Bookmarked verses are saved to a bookmarks database table.  When reloading bookmarks from the table a Versification must be specified.

I think we need to save the v11n along with the list of verses. If none is defined then assume KJV.


> 
> To get it working most of the time I could just use the default versification as follows:
>    savedBookmarkKey = PassageKeyFactory.instance().getKey(Versifications.instance().getDefaultVersification(), verseReferenceFromDb);

Suggest: use Versifications.DEFAULT_V11N or SystemKJV.V11N_NAME as a param to getVersification(String).

> 
> But I notice that AbstractPassage is tied to Versification and wonder if this will even work for simple cases like Jn 3:16.

I'm not sure what you mean.

John 3:16 and most verses in the NT are rather fixed. The OT has the most variation from one V11N to another.

> 
> Eventually I probably need to record the current versification when saving the bookmark, but even then I will have the correct versification for the key but can the restored bookmark be used with different versifications.  I mean can a common Key/Verse like Jn 3:16 be used with different Versifications or do I have to generate a different Key for every Versification when viewing multiple modules with different Versifications.

The core optimization of a V11N is the "ordinal" value of a verse. Conversion from a text reference to an ordinal value is costly. The ordinal value should be thought of as unique to a v11n. That is you can't use the ordinal value from one v11n for a different one.

There is a significant need to map one v11n to another. Only then can we accurately put in parallel books with different v11n.

I'm still trying to figure out what is the best way to handle parallel views prior to such a mapping. Several thoughts:
a) only allow parallel views for books having the same v11n.
b) warn the user when they pick different v11ns for parallel views.
c) don't do anything special other than limiting verse picks from the v11n of the first book ("leftmost" book).

I'm leaning toward c because this is what a user would have to do today if they had paper copies of the book.

We might need a way of casting a Verse from one v11n to another. A verse is immutable and contains the v11n and the ordinal value for it.

> 
> This might be because I am still a bit confused regarding the way Versifications are implemented.
> 
> Martin
> 
> 
> 
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel




More information about the jsword-devel mailing list