[jsword-devel] jsword-devel Digest, Vol 65, Issue 1

Yiguang Hu yighu at yahoo.com
Fri Oct 2 13:58:50 MST 2009


Did you take a look at the samples here? 
http://www.crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html

It seems the jsword didn't provide a direct way to get all book names directly. (Please let us know if there is one). This is how I get it in groovy.

def bibles = new ArrayList()
      int nbook = BibleInfo.booksInBible();
      BibleNames bn = new BibleNames(loc)

      try {
        for (int i = 1; i <= nbook; i++)

        {

          def gb = new Expando()
          gb.key = BibleInfo.getBookName(i).getShortName()
          gb.shortname = bn.getShortName(i)
          gb.cname = bn.getName(i)
          gb.longname = BibleInfo.getBookName(i).getLongName()
          biblekeymap.put(gb.longname, gb.cname)
          biblekeymap.put(gb.shortname, gb.cname)
          biblekeymap.put(gb.key, gb.cname)

          bibles.add(gb)
        }


      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    return bibles



--- On Fri, 10/2/09, jsword-devel-request at crosswire.org <jsword-devel-request at crosswire.org> wrote:

From: jsword-devel-request at crosswire.org <jsword-devel-request at crosswire.org>
Subject: jsword-devel Digest, Vol 65, Issue 1
To: jsword-devel at crosswire.org
Date: Friday, October 2, 2009, 3:00 PM

Send jsword-devel mailing list submissions to
    jsword-devel at crosswire.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.crosswire.org/mailman/listinfo/jsword-devel
or, via email, send a message with subject or body 'help' to
    jsword-devel-request at crosswire.org

You can reach the person managing the list at
    jsword-devel-owner at crosswire.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of jsword-devel digest..."


Today's Topics:

   1. Beginning with JSword (Chris Burrell)


----------------------------------------------------------------------

Message: 1
Date: Fri, 2 Oct 2009 19:20:50 +0100
From: Chris Burrell <christopher at burrell.me.uk>
Subject: [jsword-devel] Beginning with JSword
To: jsword-devel at crosswire.org
Message-ID:
    <8c0aba2c0910021120q569368cjab446b850afeb557 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi

I'm trying to get a list of all the books in the bible for a particular
Book, say the ESV. I'm really new to this... Any ideas if there are examples
on the net? I've fonud the Global Key list but that seems to have most
verses as well... Can anyone point me to the helpful apis? I seem to find it
really difficult to find it on the crosswire website...

What is a chapter? a book category? ...

Cheers
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20091002/72a1e4a7/attachment-0001.html>

------------------------------

_______________________________________________
jsword-devel mailing list
jsword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/jsword-devel


End of jsword-devel Digest, Vol 65, Issue 1
*******************************************



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20091002/ca98931b/attachment.html>


More information about the jsword-devel mailing list