[jsword-svn] r1264 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/resources biblemapper/src/main/java/org/crosswire/biblemapper/swing biblemapper/src/test/java/org/crosswire/biblemapper/model common common/src/main/java/org/crosswire/common/progress common/src/main/java/org/crosswire/common/util jsword/src/main/java/org/crosswire/jsword/book jsword/src/main/java/org/crosswire/jsword/book/sword jsword/src/main/java/org/crosswire/jsword/examples jsword/src/main/java/org/crosswire/jsword/passage jsword/src/test/java jsword/src/test/java/org/crosswire/jsword/book jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop jsword-limbo/src/main/java/org/crosswire/jsword/book/remote

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Fri Mar 30 11:00:19 MST 2007


Author: dmsmith
Date: 2007-03-30 11:00:18 -0700 (Fri, 30 Mar 2007)
New Revision: 1264

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
   trunk/bibledesktop/src/main/resources/config.properties
   trunk/bibledesktop/src/main/resources/config.xml
   trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
   trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java
   trunk/biblemapper/src/test/java/org/crosswire/biblemapper/model/LinkArrayTest.java
   trunk/common/core.xml
   trunk/common/src/main/java/org/crosswire/common/progress/Progress.java
   trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/ComparePane.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/GeneratorPane.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/MaintenancePane.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/LocalRemoterTest.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookFilters.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/Defaults.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordUtil.java
   trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java
   trunk/jsword/src/test/java/Bench.java
   trunk/jsword/src/test/java/org/crosswire/jsword/book/BookParentTst.java
   trunk/jsword/src/test/java/org/crosswire/jsword/book/BooksTest.java
Log:
Added new option to list commentaries along with bibles in DisplaySelectPane.
Cleaned up QA warnings.
Preparing for 1.0.6 release.

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -97,7 +97,7 @@
 
         actions = new ActionFactory(DisplaySelectPane.class, this);
 
-        // search() and version() rely on this returning only Bibles
+        // search() and version() rely on this returning only Books indexed by verses
         mdlBible = new BooksComboBoxModel(BookFilters.getBibles());
         JComboBox cboBible = new JComboBox(mdlBible);
         cboBible.setPrototypeDisplayValue(" "); //$NON-NLS-1$

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -309,7 +309,7 @@
         panel.add(cboVerse, null);
         return panel;
     }
-   
+
     /**
      * Build a tree for a GenBook
      */
@@ -325,7 +325,7 @@
         });
         return new JScrollPane(dictionaryKeyList);
     }
-   
+
     /**
      * Build a tree for a GenBook
      */

Modified: trunk/bibledesktop/src/main/resources/config.properties
===================================================================
--- trunk/bibledesktop/src/main/resources/config.properties	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/bibledesktop/src/main/resources/config.properties	2007-03-30 18:00:18 UTC (rev 1264)
@@ -22,6 +22,8 @@
 Bibles.DefaultHebrewParse.help=Which of the available Hebrew Morphology/Parsing Guides is the default.
 BibleDisplay.Reuse.path=Bible Display.Open links in same Bible View
 BibleDisplay.Reuse.help=Reuse Bible View for links.
+BibleDisplay.Commentaries.path=Bible Display.List Commentaries with Bibles
+BibleDisplay.Commentaries.help=List Commentaries with Bibles
 BibleDisplay.Sidebar.path=Bible Display.Show the Passage Sidebar
 BibleDisplay.Sidebar.help=Show the Passage Sidebar
 BibleDisplay.Converter.path=Bible Display.Converter

Modified: trunk/bibledesktop/src/main/resources/config.xml
===================================================================
--- trunk/bibledesktop/src/main/resources/config.xml	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/bibledesktop/src/main/resources/config.xml	2007-03-30 18:00:18 UTC (rev 1264)
@@ -132,6 +132,10 @@
     <introspect class="org.crosswire.bibledesktop.desktop.Desktop" property="BibleViewReused"/>
   </option>
 
+  <option key="BibleDisplay.Commentaries" type="boolean">
+    <introspect class="org.crosswire.jsword.book.BookFilters" property="CommentariesWithBibles"/>
+  </option>
+
   <option key="BibleDisplay.Sidebar" type="boolean">
     <introspect class="org.crosswire.bibledesktop.desktop.Desktop" property="SidebarShowing"/>
   </option>

Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -70,7 +70,7 @@
             PrintWriter dbout = new PrintWriter(new FileOutputStream("c:\\database.csv"));
             PrintWriter xlout = new PrintWriter(new FileOutputStream("c:\\sheet.csv"));
 
-            List dicts = Books.installed().getBooks(BookFilters.getBibles());
+            List dicts = Books.installed().getBooks(BookFilters.getOnlyBibles());
             Book book = (Book) dicts.get(0);
             //Matcher engine = new Matcher(bible);
 

Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -159,7 +159,7 @@
 
             config.localToApplication();
 
-            List dicts = Books.installed().getBooks(BookFilters.getBibles());
+            List dicts = Books.installed().getBooks(BookFilters.getOnlyBibles());
             Book book = (Book) dicts.get(0);
 
             la = new LinkArray(book);
@@ -906,7 +906,7 @@
     {
         try
         {
-            BookChooser chooser = new BookChooser(BookFilters.getBibles());
+            BookChooser chooser = new BookChooser(BookFilters.getOnlyBibles());
             int reply = chooser.showDialog(this);
 
             if (reply == BookChooser.APPROVE_OPTION)

Modified: trunk/biblemapper/src/test/java/org/crosswire/biblemapper/model/LinkArrayTest.java
===================================================================
--- trunk/biblemapper/src/test/java/org/crosswire/biblemapper/model/LinkArrayTest.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/biblemapper/src/test/java/org/crosswire/biblemapper/model/LinkArrayTest.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -60,7 +60,7 @@
     {
         RawBook.setDefaultCacheData(true);
 
-        List dicts = Books.installed().getBooks(BookFilters.getBibles());
+        List dicts = Books.installed().getBooks(BookFilters.getOnlyBibles());
         Book book = (Book) dicts.get(0);
 
         LinkArray la = new LinkArray(book);

Modified: trunk/common/core.xml
===================================================================
--- trunk/common/core.xml	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/common/core.xml	2007-03-30 18:00:18 UTC (rev 1264)
@@ -10,7 +10,7 @@
     == These are the standard locations that this build file uses.
     == This assumes that the build file is in the root of the project.
     =========================================================================-->
-  <property name="release.version" value="1.0.5"/>
+  <property name="release.version" value="1.0.6"/>
   <property name="source.root"     value="src"/>
   <property name="source.etc"      value="etc"/>
   <property name="source.jar"      value="jar"/>
@@ -25,7 +25,7 @@
   <property name="test.classes"    value="${test.root}/classes"/>
   <property name="test.jar"        value="${test.root}"/>
   <property name="keystore.file"   value="../common/common.keystore"/>
-  <property name="keystore.alias"  value="test builds"/>
+  <property name="keystore.alias"  value="jsword"/>
   <property name="keystore.pswd"   value="p455w0rd"/>
   <available file="${source.jar}" type="dir" property="jardir.present"/>
   <available file="${source.res}" type="dir" property="resdir.present"/>
@@ -396,7 +396,7 @@
 	  <signjar
       	  storepass="${keystore.pswd}"
       	  alias="${keystore.alias}"
-      	  keystore="${keystore.file}"
+      	  keystore="../common/crosswire.keystore"
       	  keypass="${keystore.pswd}"
       	  jar="@{srcdir}/@{jar}"
       	  signedjar="@{destdir}/@{jar}"/>

Modified: trunk/common/src/main/java/org/crosswire/common/progress/Progress.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/progress/Progress.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/common/src/main/java/org/crosswire/common/progress/Progress.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -33,7 +33,7 @@
     /**
      * Indicate that the total amount of work is unknown.
      */
-    static int UNKNOWN = -1;
+    int UNKNOWN = -1;
 
     /**
      * Start the task.
@@ -106,5 +106,4 @@
      */
     void setCancelable(boolean newCancelable);
 
-
 }

Modified: trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -67,45 +67,62 @@
         String msg = new String(sout.getBuffer());
         String[] calls = StringUtil.split(msg, "\n\r"); //$NON-NLS-1$
 
-        classNames = new String[calls.length - discard];
-        methodNames = new String[calls.length - discard];
-        fileNames = new String[calls.length - discard];
-        lineNumbers = new int[calls.length - discard];
+        int total = 0;
+        for (int i = 0; i < calls.length - discard; i++)
+        {
+            String call = calls[i + discard];
 
-        for (int i = 0; i < classNames.length; i++)
+            if (!(call.startsWith("Caused") || call.indexOf("...") >= 0)) //$NON-NLS-1$ //$NON-NLS-2$
+            {
+                total++;
+            }
+        }
+
+        classNames = new String[total];
+        methodNames = new String[total];
+        fileNames = new String[total];
+        lineNumbers = new int[total];
+
+        int j = 0;
+        for (int i = 0; i < calls.length - discard; i++)
         {
             String call = calls[i + discard];
 
             try
             {
-                int spcIndex = call.indexOf(' ');
-                int lhsIndex = call.indexOf('(');
-                int clnIndex = call.indexOf(':');
-                int rhsIndex = call.indexOf(')');
+                if (!(call.startsWith("Caused") || call.indexOf("...") >= 0)) //$NON-NLS-1$ //$NON-NLS-2$
+                {
+                    int spcIndex = call.indexOf(' ');
+                    int lhsIndex = call.indexOf('(');
+                    int clnIndex = call.indexOf(':');
+                    int rhsIndex = call.indexOf(')');
 
-                String fullFn = call.substring(spcIndex + 1, lhsIndex).trim();
-                int lastDot = fullFn.lastIndexOf('.');
+                    String fullFn = call.substring(spcIndex + 1, lhsIndex).trim();
+                    int lastDot = fullFn.lastIndexOf('.');
 
-                classNames[i] = fullFn.substring(0, lastDot).replace('/', '.');
-                methodNames[i] = fullFn.substring(lastDot + 1);
+                    classNames[j] = fullFn.substring(0, lastDot).replace('/', '.');
+                    methodNames[j] = fullFn.substring(lastDot + 1);
 
-                if (clnIndex != -1)
-                {
-                    fileNames[i] = call.substring(lhsIndex + 1, clnIndex);
-                    lineNumbers[i] = Integer.parseInt(call.substring(clnIndex + 1, rhsIndex));
+                    if (clnIndex != -1 && lhsIndex < clnIndex)
+                    {
+                        fileNames[j] = call.substring(lhsIndex + 1, clnIndex);
+                        lineNumbers[j] = Integer.parseInt(call.substring(clnIndex + 1, rhsIndex));
+                    }
+                    else
+                    {
+                        fileNames[j] = call.substring(lhsIndex + 1, rhsIndex);
+                        lineNumbers[j] = 0;
+                    }
+                    j++;
                 }
-                else
-                {
-                    fileNames[i] = call.substring(lhsIndex + 1, rhsIndex);
-                    lineNumbers[i] = 0;
-                }
             }
             catch (NumberFormatException ex2)
             {
-                classNames[i] = "ParseError: "; //$NON-NLS-1$
-                methodNames[i] = call;
-                fileNames[i] = "Error"; //$NON-NLS-1$
-                lineNumbers[i] = 0;
+                classNames[j] = "ParseError: "; //$NON-NLS-1$
+                methodNames[j] = call;
+                fileNames[j] = "Error"; //$NON-NLS-1$
+                lineNumbers[j] = 0;
+                j++;
             }
         }
     }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -117,7 +117,7 @@
     /* (non-Javadoc)
      * @see java.lang.Object#equals(java.lang.Object)
      */
-    public final boolean equals(Object o)
+    public boolean equals(Object o)
     {
         return super.equals(o);
     }
@@ -125,7 +125,7 @@
     /* (non-Javadoc)
      * @see java.lang.Object#hashCode()
      */
-    public final int hashCode()
+    public int hashCode()
     {
         return super.hashCode();
     }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookFilters.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookFilters.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookFilters.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -49,23 +49,41 @@
      */
     public static BookFilter getAll()
     {
-        return allBookFilter;
+        return new AllBookFilter();
     }
 
     /**
      * A filter that accepts everything that implements Bible
+     * or Commentary, when commentaries are listed with Bibles.
      */
     public static BookFilter getBibles()
     {
-        return biblesBookFilter;
+        if (commentariesWithBibles)
+        {
+            return either(new BookCategoryFilter(BookCategory.BIBLE), new BookCategoryFilter(BookCategory.COMMENTARY));
+        }
+        return new BookCategoryFilter(BookCategory.BIBLE);
     }
 
     /**
+     * A filter that accepts everything that implements Bible.
+     */
+    public static BookFilter getOnlyBibles()
+    {
+        return new BookCategoryFilter(BookCategory.BIBLE);
+    }
+
+    /**
      * A filter that accepts everything that's not a Bible
+     * or a Commentary, when commentaries are listed with Bibles.
      */
     public static BookFilter getNonBibles()
     {
-        return noneBibleBookFilter;
+        if (commentariesWithBibles)
+        {
+            return both(new NotBookCategoryFilter(BookCategory.BIBLE), new NotBookCategoryFilter(BookCategory.COMMENTARY));
+        }
+        return new NotBookCategoryFilter(BookCategory.BIBLE);
     }
 
     /**
@@ -73,7 +91,7 @@
      */
     public static BookFilter getDictionaries()
     {
-        return dictionariesBookFilter;
+        return new BookCategoryFilter(BookCategory.DICTIONARY);
     }
 
     /**
@@ -81,7 +99,7 @@
      */
     public static BookFilter getGlossaries()
     {
-        return glossariesBookFilter;
+        return new BookCategoryFilter(BookCategory.GLOSSARY);
     }
 
     /**
@@ -89,7 +107,7 @@
      */
     public static BookFilter getDailyDevotionals()
     {
-        return dailyDevotionalsBookFilter;
+        return new BookCategoryFilter(BookCategory.DAILY_DEVOTIONS);
     }
 
     /**
@@ -97,7 +115,7 @@
      */
     public static BookFilter getCommentaries()
     {
-        return commentariesBookFilter;
+        return new BookCategoryFilter(BookCategory.COMMENTARY);
     }
 
     /**
@@ -105,7 +123,7 @@
      */
     public static BookFilter getGeneralBooks()
     {
-        return generalBookFilter;
+        return new BookCategoryFilter(BookCategory.GENERAL_BOOK);
     }
 
     /**
@@ -114,7 +132,7 @@
      */
     public static BookFilter getGreekDefinitions()
     {
-        return greekDefinitionsBookFilter;
+        return new BookFeatureFilter(FeatureType.GREEK_DEFINITIONS);
     }
 
     /**
@@ -123,7 +141,7 @@
      */
     public static BookFilter getGreekParse()
     {
-        return greekParseBookFilter;
+        return new BookFeatureFilter(FeatureType.GREEK_PARSE);
     }
 
     /**
@@ -132,7 +150,7 @@
      */
     public static BookFilter getHebrewDefinitions()
     {
-        return hebrewDefinitionsBookFilter;
+        return new BookFeatureFilter(FeatureType.HEBREW_DEFINITIONS);
     }
 
     /**
@@ -141,70 +159,36 @@
      */
     public static BookFilter getHebrewParse()
     {
-        return hebrewParseBookFilter;
+        return new BookFeatureFilter(FeatureType.HEBREW_PARSE);
     }
 
     /**
-     * Filter for all books
+     * Determine whether the getBible should return the current Bible
+     * or the user's chosen default.
+     * @return true if the bible tracks the user's selection
      */
-    private static BookFilter allBookFilter = new AllBookFilter();
+    public static boolean isCommentariesWithBibles()
+    {
+        return commentariesWithBibles;
+    }
 
     /**
-     * Filter for all Bibles
+     * Establish whether the getBible should return the current Bible
+     * or the user's chosen default.
+     * @param current
      */
-    private static BookFilter biblesBookFilter = new BookCategoryFilter(BookCategory.BIBLE);
+    public static void setCommentariesWithBibles(boolean current)
+    {
+        commentariesWithBibles = current;
+    }
 
     /**
-     * Filter for all non-Bibles
+     * Whether biblesBookFilter includes commentaries. Initally false.
      */
-    private static BookFilter noneBibleBookFilter = new NotBookCategoryFilter(BookCategory.BIBLE);
+    private static boolean    commentariesWithBibles;
 
-    /**
-     * Filter for all dictionaries
-     */
-    private static BookFilter dictionariesBookFilter = new BookCategoryFilter(BookCategory.DICTIONARY);
 
     /**
-     * Filter for all glossaries
-     */
-    private static BookFilter glossariesBookFilter = new BookCategoryFilter(BookCategory.GLOSSARY);
-
-    /**
-     * Filter for all dictionaries
-     */
-    private static BookFilter dailyDevotionalsBookFilter = new BookCategoryFilter(BookCategory.DAILY_DEVOTIONS);
-
-    /**
-     * Filter for all commentaries
-     */
-    private static BookFilter commentariesBookFilter = new BookCategoryFilter(BookCategory.COMMENTARY);
-
-    /**
-     * Filter for all commentaries
-     */
-    private static BookFilter generalBookFilter = new BookCategoryFilter(BookCategory.GENERAL_BOOK);
-
-    /**
-     * Filter for all Greek Definition Dictionaries
-     */
-    private static BookFilter greekDefinitionsBookFilter = new BookFeatureFilter(FeatureType.GREEK_DEFINITIONS);
-
-    /**
-     * Filter for all Greek Parse/Morphology Dictionaries
-     */
-    private static BookFilter greekParseBookFilter = new BookFeatureFilter(FeatureType.GREEK_PARSE);
-
-    /**
-     * Filter for all Hebrew Definition Dictionaries
-     */
-    private static BookFilter hebrewDefinitionsBookFilter = new BookFeatureFilter(FeatureType.HEBREW_DEFINITIONS);
-
-    /**
-     * Filter for all Hebrew Parse/Morphology Dictionaries
-     */
-    private static BookFilter hebrewParseBookFilter = new BookFeatureFilter(FeatureType.HEBREW_PARSE);
-
-    /**
      * Filter for all books
      */
     static class AllBookFilter implements BookFilter

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/Defaults.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/Defaults.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/Defaults.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -440,7 +440,7 @@
     public static void refreshBooks()
     {
         // Create the array of Bibles
-        String[] bnames = getFullNameArray(BookFilters.getBibles());
+        String[] bnames = getFullNameArray(BookFilters.getOnlyBibles());
         ChoiceFactory.getDataMap().put(BIBLE_KEY, bnames);
 
         // Create the array of Commentaries
@@ -571,7 +571,7 @@
     /**
      * The default Bible
      */
-    private static DefaultBook bibleDeft = new DefaultBook(Books.installed(), BookFilters.getBibles());
+    private static DefaultBook bibleDeft = new DefaultBook(Books.installed(), BookFilters.getOnlyBibles());
 
     /**
      * The default Commentary

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -136,7 +136,6 @@
         {
             throw new BookException(Msg.READ_FAIL);
         }
-        
     }
 
     /**
@@ -158,7 +157,7 @@
 
         node = index.getFirstChild(node);
 
-        for (int i = path.size() - 1; i >= 0; i-- )
+        for (int i = path.size() - 1; i >= 0; i--)
         {
             String name = (String) path.get(i);
 
@@ -212,7 +211,7 @@
         {
             log.error("Could not get read GenBook index", e); //$NON-NLS-1$
         }
-        
+
         return reply;
     }
 

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordUtil.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordUtil.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordUtil.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -233,8 +233,8 @@
         ByteArrayInputStream bis = new ByteArrayInputStream(compressed);
         InflaterInputStream in = new InflaterInputStream(bis, new Inflater(), ZBUF_SIZE);
         byte[] buf = new byte[ZBUF_SIZE];
-        int count;
-        while ((count = in.read(buf)) != -1)
+
+        for (int count = in.read(buf); count != -1; count = in.read(buf))
         {
             out.write(buf, 0, count);
         }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -270,7 +270,7 @@
         book = (Book) books.get(0);
 
         // Or you can narrow the range a bit
-        books = Books.installed().getBooks(BookFilters.getBibles());
+        books = Books.installed().getBooks(BookFilters.getOnlyBibles());
         book = (Book) books.get(0);
 
         // There are implementations of BookFilter for all sorts of things in

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -1034,16 +1034,26 @@
         public boolean equals(Object obj)
         {
             if (this == obj)
+            {
                 return true;
+            }
             if (obj == null)
+            {
                 return false;
+            }
             if (getClass() != obj.getClass())
+            {
                 return false;
+            }
             final TalliedVerse other = (TalliedVerse) obj;
             if (tally != other.tally)
+            {
                 return false;
+            }
             if (ord != other.ord)
+            {
                 return false;
+            }
             return true;
         }
 
@@ -1196,21 +1206,33 @@
         public boolean equals(Object obj)
         {
             if (this == obj)
+            {
                 return true;
+            }
             if (obj == null)
+            {
                 return false;
+            }
             if (getClass() != obj.getClass())
+            {
                 return false;
+            }
             final TalliedVerseRange other = (TalliedVerseRange) obj;
             if (tally != other.tally)
+            {
                 return false;
+            }
             if (range == null)
             {
                 if (other.range != null)
+                {
                     return false;
+                }
             }
             else if (!range.equals(other.range))
+            {
                 return false;
+            }
             return true;
         }
 

Modified: trunk/jsword/src/test/java/Bench.java
===================================================================
--- trunk/jsword/src/test/java/Bench.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/test/java/Bench.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -29,7 +29,7 @@
             System.exit(1);
         }
 
-        List dicts = Books.installed().getBooks(BookFilters.getBibles());
+        List dicts = Books.installed().getBooks(BookFilters.getOnlyBibles());
         version = (Book) dicts.get(0);
 
         Speed speed = new Speed(version);

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/book/BookParentTst.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/book/BookParentTst.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/book/BookParentTst.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -49,7 +49,7 @@
      */
     protected void setUp() throws Exception
     {
-        List lbmds = Books.installed().getBooks(BookFilters.getBibles());
+        List lbmds = Books.installed().getBooks(BookFilters.getOnlyBibles());
         bibles = new Book[lbmds.size()];
         bmds = new BookMetaData[lbmds.size()];
 

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/book/BooksTest.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/book/BooksTest.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/book/BooksTest.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -56,7 +56,7 @@
     /* @Override */
     protected void setUp() throws Exception
     {
-        List lbmds = Books.installed().getBooks(BookFilters.getBibles());
+        List lbmds = Books.installed().getBooks(BookFilters.getOnlyBibles());
         int numBibles = lbmds.size();
         bibles = new Book[numBibles];
         bmds = new BookMetaData[numBibles];

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/ComparePane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/ComparePane.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/ComparePane.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -185,13 +185,13 @@
      * The first Bible selection combo.
      * We cast to Bible in compare() so we need to filter
      */
-    private BooksComboBoxModel mdlBibles1 = new BooksComboBoxModel(BookFilters.getBibles());
+    private BooksComboBoxModel mdlBibles1 = new BooksComboBoxModel(BookFilters.getOnlyBibles());
 
     /**
      * The second Bible selection combo
      * We cast to Bible in compare() so we need to filter
      */
-    private BooksComboBoxModel mdlBibles2 = new BooksComboBoxModel(BookFilters.getBibles());
+    private BooksComboBoxModel mdlBibles2 = new BooksComboBoxModel(BookFilters.getOnlyBibles());
 
     /* GUI Components */
     private Box boxTop;

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/GeneratorPane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/GeneratorPane.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/GeneratorPane.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -231,7 +231,7 @@
      * The model for the sources.
      * Bibles are required in GeneratorRunnable.run()
      */
-    protected BooksComboBoxModel mdlSource = new BooksComboBoxModel(BookFilters.getBibles());
+    protected BooksComboBoxModel mdlSource = new BooksComboBoxModel(BookFilters.getOnlyBibles());
 
     /**
      * Layout for the destination panel

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/MaintenancePane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/MaintenancePane.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/desktop/MaintenancePane.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -196,7 +196,7 @@
     /**
      * The BiblesModel for the list
      */
-    private BooksComboBoxModel mdl_versions = new BooksComboBoxModel(BookFilters.getBibles());
+    private BooksComboBoxModel mdl_versions = new BooksComboBoxModel(BookFilters.getOnlyBibles());
 
     /**
      * The button bar

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/LocalRemoterTest.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/LocalRemoterTest.java	2007-03-25 02:05:01 UTC (rev 1263)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/LocalRemoterTest.java	2007-03-30 18:00:18 UTC (rev 1264)
@@ -53,7 +53,7 @@
 
     public void testGetBibles() throws Exception
     {
-        BookFilter filter = BookFilters.getBibles();
+        BookFilter filter = BookFilters.getOnlyBibles();
         List lbooks = Books.installed().getBooks(filter);
         Book[] names1 = (Book[]) lbooks.toArray(new Book[lbooks.size()]);
         RemoteBookDriver rbd = new LocalRemoteBookDriver();




More information about the jsword-svn mailing list