[jsword-devel] Simple question on how best to get a Key or Verse

Tonny Kohar tonny.kohar at gmail.com
Thu Jul 8 23:49:50 MST 2010


Hi,

On Fri, Jul 9, 2010 at 4:22 AM, Martin Denham <mjdenham at gmail.com> wrote:
> Hi,
> I currently maintain book, chapter and verse as integers in my application
> and to get a Verse/Key I first convert the numbers into a String e.g. 1,2,3
> -> Gen 2:3.  Then I use book.getKey("Gen 2:3").  Is there a way to get a
> Verse/Key without creating a string representation of the verse e.g. new
> Verse(1,2,3)?
> Or have I misunderstand the intended method to use these classes?

I am not the API designer, so my guess is because the verse/key format
allow various thing:
- single verse like your example
- range format eg: Gen 1:5-10
- combo eg: Gen 1:5-10, Matt 1:4, John 1:4-5,9,12
- and the key also can be used in other type of book eg: general book,
glossary, maps, etc
- etc

So it is easier to use string and parse the string.

Cheers
Tonny Kohar
--
Alkitab Bible Study
http://www.kiyut.com/products/alkitab/index.html



More information about the jsword-devel mailing list