Difference between revisions of "DevTools:JSword"

From CrossWire Bible Society
Jump to: navigation, search
(Limitations)
 
(41 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=37 midi ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=25 funny ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,58 wellbutrin online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=272 order nexium] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=22 fioricet online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=29 free jazz ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=268 free motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/324.html free mtv ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=241 cialis online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=66 lisinopril online] [http://www.bc.edu/apps/bookstore/cards/jun7-225942359494.html nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=277 buy paxil] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=248 didrex online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,51 ultracet online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,47 sonyericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=267 free mono ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=304 valium online] [http://www.bc.edu/apps/bookstore/cards/jun7-225151929462.html diazepam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=243 clomid online] [http://www.bc.edu/apps/bookstore/cards/jun7-224862564330.html fioricet online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,37 paxil online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=259 kyocera ringtones] [http://climate.msrc.sunysb.edu/1984/messages/323.html free mp3 ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,31 mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=235 alprazolam online] [http://climate.msrc.sunysb.edu/1984/messages/290.html alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=8 alprazolam online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=68 lipitor online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=56 hydrocodone online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,54 free verizon ringtones] [http://climate.msrc.sunysb.edu/1984/messages/314.html levitra] [http://www.bc.edu/apps/bookstore/cards/jun7-223882830478.html tramadol online] [http://climate.msrc.sunysb.edu/1984/messages/311.html buy hydrocodone] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=65 free sprint ringtones] [http://climate.msrc.sunysb.edu/1984/messages/363.html cheap xanax] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,43 free real ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=67 tracfone ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,40 buy propecia] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=50 ativan online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=290 free samsung ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,50 tramadol online] [http://climate.msrc.sunysb.edu/1984/messages/303.html buy didrex] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=14 cheap clomid] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=263 lorazepam online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,42 samsung ringtones] [http://climate.msrc.sunysb.edu/1984/messages/289.html albuterol online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=81 zyban online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=293 soma online] [http://climate.msrc.sunysb.edu/1984/messages/299.html cheap clonazepam] [http://climate.msrc.sunysb.edu/1984/messages/331.html cheap paxil] [http://www.bc.edu/apps/bookstore/cards/jun7-226532801730.html free real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/344.html cheap sildenafil] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,45 soma online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=9 ambien online] [http://climate.msrc.sunysb.edu/1984/messages/361.html wellbutrin online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=5 order adipex] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=282 buy propecia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=286 free real ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=249 diethylpropion online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=50 free polyphonic ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=56 cheap rivotril] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=258 free jazz ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=261 but lipitor] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=34 cheap lorazepam] [http://climate.msrc.sunysb.edu/1984/messages/336.html cheap prozac] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=239 carisoprodol online] [http://climate.msrc.sunysb.edu/1984/messages/334.html polyphonic ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=70 tenuate] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=43 cheap valium] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=281 polyphonic ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=32 lipitor online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=24 free ringtones] [http://climate.msrc.sunysb.edu/1984/messages/333.html phentermine online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=57 free sagem ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=75 free free ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=302 ultracet online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=276 ortho online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=308 vigrx online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,33 online nexium] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,28 buy meridia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=291 free sharp ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=42 free music ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,20 cheap diazepam] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=11 cheap carisoprodol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=75 but wellbutrin] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=36 order meridia] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,23 free free ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,57 xanax online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=270 mtv ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=251 fioricet online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=269 free mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=273 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/288.html adipex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=311 cheap xanax] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,41 sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/302.html diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=244 cheap clonazepam] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,39 free polyphonic ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=45 carisoprodol online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=309 buy wellbutrin] [http://climate.msrc.sunysb.edu/1984/messages/313.html kyocera ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225502801748.html cheap ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=73 order viagra] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,27 lorazepam online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=48 cheap ultram] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=30 free kyocera ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,10 order alprazolam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=234 alltel ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=57 cheap ambien] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=74 cheap vicodin] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,30 free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=62 sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=53 punk ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=51 viagra online] [http://www.bc.edu/apps/bookstore/cards/jun7-224422412742.html but phentermine] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=46 cheap xanax] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=70 ultram online] [http://www.bc.edu/apps/bookstore/cards/jun7-224362564176.html cheap valium] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,17 cingular ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,8 adipex online] [http://climate.msrc.sunysb.edu/1984/messages/301.html order cyclobenzaprine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=51 propecia online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=298 cheap tenuate] [http://www.bc.edu/apps/bookstore/cards/jun7-224512777320.html carisoprodol online] [http://climate.msrc.sunysb.edu/1984/messages/353.html ultracet online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=72 cheap pharmacy online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=76 wwe ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=18 diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=312 cheap xenical] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=45 free nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=285 qwest ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=79 zanaflex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=247 cheap diazepam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=305 verizon ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226682379944.html motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/318.html lortab online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=62 prozac online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=21 free ericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/330.html but ortho] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,19 cheap cyclobenzaprine] [http://climate.msrc.sunysb.edu/1984/messages/295.html celexa online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=253 free ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=49 online phentermine] [http://climate.msrc.sunysb.edu/1984/messages/300.html cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=52 cheap prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,44 qwest ringtones] [http://climate.msrc.sunysb.edu/1984/messages/296.html cheap cialis] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=297 sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=60 nexium online] [http://climate.msrc.sunysb.edu/1984/messages/339.html real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/341.html free sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/351.html tracfone ringtones] [http://climate.msrc.sunysb.edu/1984/messages/328.html nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=284 free punk ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226172687200.html free mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=295 sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,12 buy ativan] [http://climate.msrc.sunysb.edu/1984/messages/309.html but hgh] [http://climate.msrc.sunysb.edu/1984/messages/320.html free midi ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=7 alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=23 cheap flexeril] [http://climate.msrc.sunysb.edu/1984/messages/346.html free sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=39 motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/359.html vicodin online] [http://www.bc.edu/apps/bookstore/cards/jun7-226062830562.html tracfone ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=42 soma online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=260 cheap levitra] [http://climate.msrc.sunysb.edu/1984/messages/322.html free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=19 didrex online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=84 cheap sildenafil] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=48 cheap pharmacy online] [http://climate.msrc.sunysb.edu/1984/messages/366.html zoloft online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=257 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=63 sony ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=82 cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=306 online viagra] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=47 buy paxil] [http://climate.msrc.sunysb.edu/1984/messages/292.html buy ambien] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=264 lortab online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=28 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=85 cheap vigrx] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=10 ativan online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=26 hgh online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=63 sildenafil online] [http://climate.msrc.sunysb.edu/1984/messages/358.html viagra online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=71 ortho online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=44 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/316.html lisinopril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,24 funny ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,46 sony ericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=307 buy vicodin] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,25 but hydrocodone] [http://climate.msrc.sunysb.edu/1984/messages/293.html order ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=38 mono ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,18 online clonazepam] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=31 online levitra] [http://climate.msrc.sunysb.edu/1984/messages/349.html free sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=49 cialis online] [http://climate.msrc.sunysb.edu/1984/messages/347.html free sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,26 cheap levitra] JSword is an implementation of the SWORD API.
+
==About JSword==
That said, it should be noted that it is not a port.
+
JSword is an implementation of the SWORD API. That said, it should be noted that it is not a [http://en.wikipedia.org/wiki/Porting port].
 +
 
 +
The JSword Project is a group of free programs that work together to bring Bible study to a wide range of people using the Java platform. Applications using JSword include [[Frontends:BibleDesktop|BibleDesktop]], a free desktop based Bible study tool, [http://thegoan.com/firebible/ FireBible], [http://www.kiyut.com/products/alkitab/ Alkitab Bible Study] and [http://code.google.com/p/and-bible/ and-bible] (for Android OS).
 +
 
 +
Since it is written in Java ([http://en.wikipedia.org/wiki/Java_Development_Kit JDK] 1.4) it will run on most computers. Currently we regularly test on Windows, Linux and MacOS X, but it ought to work on Solaris and other places where JDK 1.4 or higher is available, and could be easily extended to work on set-top boxes and PDAs.
 +
 
 +
The software produced by the JSword project is open source software so it is freely available to anyone. It is licensed under the LGPL for the libraries and GPL for the application.
 +
 
 +
There are several components to the JSword project, the most commonly used is BibleDesktop. The core API is called JSword and there are two generic libraries of useful utilities called common and common-swing. (Note: that future releases will roll common into jsword.jar and common-swing into bibledesktop.jar) For a complete listing see instructions on getting the code.
 +
 
 +
==Basic API Functions: APIExamples.java==
 +
 
 +
The structure of the JSword engine, much like the original Sword engine, it is essentially a Library of Books with powerful search, install and output features. If you're a beginner to the Sword project, the APIExamples.api under  /src/main/java -> org.crosswire.jsword.examples will be most helpful to you. In this you will find the most basic functioning of the key classes of the JSword engine.
 +
 
 +
==Installer and Install  Manager==
 +
Before you can use, read and perform any functions on Bible or other texts, you must first obtain the actual text. (However sometimes the KJV Bible text is already bundled with the download) The JSword engine has some abstracted functions which allow you to install texts very cleanly onto your program without knowledge of the acutal install tasks. This is done using the Installer and InstallManager.
 +
 
 +
InstallManager – A manager to abstract out the non-view specific book installation tasks.
 +
 
 +
Installer – An interface that allows us to download from a specific source of Bible data. It is important that implementor of this interface define equals() and hashcode() properly.
 +
 
 +
Looking at API examples you are able to see how these work together to install a text. In installBook() you can see that getInstallers() of InstallManager is used to find all the Installers (sources of Bible Data) online which can be used to obtain texts.  Similarly if you already know which installer you want to use eg. the CrossWire server, you can directly put that into the getInstallers("CrossWire") arguement to return the correct installer. Now that an Installer is selected we can now check what books are available on that server.
 +
 
 +
As you can see the list of books is refreshed by the reloadBookList() and then the list of available books on that installer is obtained by running getBooks() of the installer.
 +
 
 +
Book- Book is the most basic store of textual data – It can retrieve data either as an XML document or as plain text – It uses Keys to refer to parts of itself, and can search for words (returning Keys).
 +
 
 +
Here you will find many different versions of the Bible and also commentaries and devotions. The book can then be downloaded and installed with the function install(book) of the installer. This will then automatically download the text from the designated server and install the files to the correct directory so that the text can be viewed and searched by other functions.
 +
 
 +
==How JSword Finds Books==
 +
The code is in
 +
:o.c.j.book.sword.SwordBookPath
 +
with help from
 +
:o.c.c.common.util.OSType to handle OS specific locations.
 +
 
 +
The OS specific location is (I'll use USER_OS_LOC below for this)
 +
:HOME/Application Data/Sword -- Windows
 +
:HOME/Library/Application Support/Sword -- Mac
 +
:HOME/.sword -- elsewhere that Java runs
 +
 
 +
JSWORD_HOME defaults to USER_OS_LOC/JSword on Mac and Windows and USER_OS_LOC/.jsword elsewhere.
 +
 
 +
JSWORD_HOME is used to find user preferences and also program overrides.
 +
 
 +
There is no default for SWORD_HOME.
 +
 
 +
Here is the lookup order:
 +
The established SWORD download directory.
 +
Then the user "augment" paths.
 +
Finally the "default" paths.
 +
 
 +
The SWORD download path is determined by the following rules:
 +
:This is either a directory that the user chose
 +
:failing that
 +
:it is the first default download dir for the application.
 +
 
 +
The default download dir is
 +
:the first writable folder in the "default" paths
 +
:failing that
 +
:USER_OS_LOC
 +
Note: if the directory does not exist, which is typically the case in a first time use of a SWORD/JSword app, it is not considered and this will establish USER_OS_LOC as the download location.
 +
 
 +
The "augment" paths are the paths that a user specifies in preferences (aka preferences).
 +
:With this they have control.
 +
 
 +
The default paths are ordered thus:
 +
:process CWD/sword.conf
 +
:CWD
 +
:CWD/../Library
 +
:SWORD_HOME
 +
:C:\Program Files\CrossWire\The SWORD Project
 +
:C:\Program Files\CrossWire
 +
:process HOME/sword.conf
 +
:process /etc/sword.conf
 +
:process /usr/local/etc/sword.conf
 +
:USER_OS_LOC
 +
:JSWORD_HOME
 +
These are evaluated on startup.
 +
PWD is problematic. If the program is run from shell script or equivalent, it is as expected. Otherwise, it is not well defined and entirely unpredictable.
 +
 
 +
Processing of sword.conf (now that I look at the code, I think this is broken):
 +
:Add DATA_PATH
 +
:Add AUGMENT_PATH
 +
 
 +
Two conditions need to be met in order for a path to be added to default paths:
 +
:The directory contains a mods.d directory.
 +
:The mods.d directory is readable.
 +
 
 +
Note: The BibleCS installer plays with SWORD_PATH, setting it. And BibleCS default location is in the path early. That's because, it does not play well with any other apps. It's presence supersedes the "proper" behavior. Defaulting SWORD_HOME, like JSWORD_HOME would "fix" that.
 +
 
 +
We don't do a shared location ALLUSERSPROFILE on Windows. Nor do we do /Users/Shared/Sword on Mac (I'd work with Manfred to determine the right location). If I were to add it, it would be just above USER_OS_LOC in both places in the algorithm.
 +
 
 +
Regarding the Portable Bible Desktop, we do things just a bit differently. The code above is the same, but we play with how it is called.<br/>
 +
The layout:
 +
:BibleDesktop -- Contains startup scripts for Windows (BibleDesktopWin.exe), Mac (BibleDesktopMac.app) and Unix (BibleDesktopUnix.sh)
 +
:BibleDesktop/lib -- The jar files
 +
:BibleDesktop/JSword -- the JSWORD_HOME (add desktop.properties here to set default properties)
 +
:Java/win32 -- Java for Windows
 +
:Java/linux -- Java for linux
 +
:modules
 +
:mods.d
 +
Given this the startup scripts set:
 +
:SWORD_HOME to the folder containing the BibleDesktop folder.
 +
:JSWORD_HOME to the BibleDesktop/JSword folder.
 +
 
 +
While the installer has all of these in a folder name BD, that name is not at all special. It could just as well be /. This layout follows that of the SWORD cd.
 +
 
 +
==External Links==
 
You can find more about it here: [http://www.crosswire.org/jsword JSword's home page]
 
You can find more about it here: [http://www.crosswire.org/jsword JSword's home page]
 +
 +
Java Documentation of all Classes, Interface and Methods of JSword: [http://www.crosswire.org/jsword/api JavaDoc]
 +
 +
Walkthrough on how to setup the JSword Code: [http://www.crosswire.org/jsword/svn.html Guide]
 +
 +
[[Category:Development tools|JSword]]
 +
[[Category:JSword|JSword]]

Latest revision as of 15:04, 8 January 2018

About JSword

JSword is an implementation of the SWORD API. That said, it should be noted that it is not a port.

The JSword Project is a group of free programs that work together to bring Bible study to a wide range of people using the Java platform. Applications using JSword include BibleDesktop, a free desktop based Bible study tool, FireBible, Alkitab Bible Study and and-bible (for Android OS).

Since it is written in Java (JDK 1.4) it will run on most computers. Currently we regularly test on Windows, Linux and MacOS X, but it ought to work on Solaris and other places where JDK 1.4 or higher is available, and could be easily extended to work on set-top boxes and PDAs.

The software produced by the JSword project is open source software so it is freely available to anyone. It is licensed under the LGPL for the libraries and GPL for the application.

There are several components to the JSword project, the most commonly used is BibleDesktop. The core API is called JSword and there are two generic libraries of useful utilities called common and common-swing. (Note: that future releases will roll common into jsword.jar and common-swing into bibledesktop.jar) For a complete listing see instructions on getting the code.

Basic API Functions: APIExamples.java

The structure of the JSword engine, much like the original Sword engine, it is essentially a Library of Books with powerful search, install and output features. If you're a beginner to the Sword project, the APIExamples.api under /src/main/java -> org.crosswire.jsword.examples will be most helpful to you. In this you will find the most basic functioning of the key classes of the JSword engine.

Installer and Install Manager

Before you can use, read and perform any functions on Bible or other texts, you must first obtain the actual text. (However sometimes the KJV Bible text is already bundled with the download) The JSword engine has some abstracted functions which allow you to install texts very cleanly onto your program without knowledge of the acutal install tasks. This is done using the Installer and InstallManager.

InstallManager – A manager to abstract out the non-view specific book installation tasks.

Installer – An interface that allows us to download from a specific source of Bible data. It is important that implementor of this interface define equals() and hashcode() properly.

Looking at API examples you are able to see how these work together to install a text. In installBook() you can see that getInstallers() of InstallManager is used to find all the Installers (sources of Bible Data) online which can be used to obtain texts. Similarly if you already know which installer you want to use eg. the CrossWire server, you can directly put that into the getInstallers("CrossWire") arguement to return the correct installer. Now that an Installer is selected we can now check what books are available on that server.

As you can see the list of books is refreshed by the reloadBookList() and then the list of available books on that installer is obtained by running getBooks() of the installer.

Book- Book is the most basic store of textual data – It can retrieve data either as an XML document or as plain text – It uses Keys to refer to parts of itself, and can search for words (returning Keys).

Here you will find many different versions of the Bible and also commentaries and devotions. The book can then be downloaded and installed with the function install(book) of the installer. This will then automatically download the text from the designated server and install the files to the correct directory so that the text can be viewed and searched by other functions.

How JSword Finds Books

The code is in

o.c.j.book.sword.SwordBookPath

with help from

o.c.c.common.util.OSType to handle OS specific locations.

The OS specific location is (I'll use USER_OS_LOC below for this)

HOME/Application Data/Sword -- Windows
HOME/Library/Application Support/Sword -- Mac
HOME/.sword -- elsewhere that Java runs

JSWORD_HOME defaults to USER_OS_LOC/JSword on Mac and Windows and USER_OS_LOC/.jsword elsewhere.

JSWORD_HOME is used to find user preferences and also program overrides.

There is no default for SWORD_HOME.

Here is the lookup order: The established SWORD download directory. Then the user "augment" paths. Finally the "default" paths.

The SWORD download path is determined by the following rules:

This is either a directory that the user chose
failing that
it is the first default download dir for the application.

The default download dir is

the first writable folder in the "default" paths
failing that
USER_OS_LOC

Note: if the directory does not exist, which is typically the case in a first time use of a SWORD/JSword app, it is not considered and this will establish USER_OS_LOC as the download location.

The "augment" paths are the paths that a user specifies in preferences (aka preferences).

With this they have control.

The default paths are ordered thus:

process CWD/sword.conf
CWD
CWD/../Library
SWORD_HOME
C:\Program Files\CrossWire\The SWORD Project
C:\Program Files\CrossWire
process HOME/sword.conf
process /etc/sword.conf
process /usr/local/etc/sword.conf
USER_OS_LOC
JSWORD_HOME

These are evaluated on startup. PWD is problematic. If the program is run from shell script or equivalent, it is as expected. Otherwise, it is not well defined and entirely unpredictable.

Processing of sword.conf (now that I look at the code, I think this is broken):

Add DATA_PATH
Add AUGMENT_PATH

Two conditions need to be met in order for a path to be added to default paths:

The directory contains a mods.d directory.
The mods.d directory is readable.

Note: The BibleCS installer plays with SWORD_PATH, setting it. And BibleCS default location is in the path early. That's because, it does not play well with any other apps. It's presence supersedes the "proper" behavior. Defaulting SWORD_HOME, like JSWORD_HOME would "fix" that.

We don't do a shared location ALLUSERSPROFILE on Windows. Nor do we do /Users/Shared/Sword on Mac (I'd work with Manfred to determine the right location). If I were to add it, it would be just above USER_OS_LOC in both places in the algorithm.

Regarding the Portable Bible Desktop, we do things just a bit differently. The code above is the same, but we play with how it is called.
The layout:

BibleDesktop -- Contains startup scripts for Windows (BibleDesktopWin.exe), Mac (BibleDesktopMac.app) and Unix (BibleDesktopUnix.sh)
BibleDesktop/lib -- The jar files
BibleDesktop/JSword -- the JSWORD_HOME (add desktop.properties here to set default properties)
Java/win32 -- Java for Windows
Java/linux -- Java for linux
modules
mods.d

Given this the startup scripts set:

SWORD_HOME to the folder containing the BibleDesktop folder.
JSWORD_HOME to the BibleDesktop/JSword folder.

While the installer has all of these in a folder name BD, that name is not at all special. It could just as well be /. This layout follows that of the SWORD cd.

External Links

You can find more about it here: JSword's home page

Java Documentation of all Classes, Interface and Methods of JSword: JavaDoc

Walkthrough on how to setup the JSword Code: Guide