[jsword-devel] Comparator to sort OSIS IDs in order of Bible occurrence

DM Smith dmsmith at crosswire.org
Wed Feb 6 14:29:05 MST 2013


Not directly. Different versifications have different order. You have to convert a biblical osisID to a Verse and then get it's ordinal value within the versification. Then you can compare the two ordinal values.

A convenience method for just this: v11n.getDistance(v1, v2).

The parsing of a string to create a Verse is way too heavy. It'd be good to have an osisID parser for a verse reference.

In Him,
	DM


On Feb 6, 2013, at 4:15 PM, Chris Burrell <chris at burrell.me.uk> wrote:

> Hi
> 
> Does JSword have a comparator than I can use against OSISIds in order to obtain the references I have in book order (i.e. Gen to Rev)
> 
> Chris
> 
> _______________________________________________
> 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