[jsword-svn] r1404 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/java/org/crosswire/bibledesktop/display bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic common/src/main/java/org/crosswire/common/compress common/src/main/java/org/crosswire/common/diff jsword/src/main/java/org/crosswire/jsword/book jsword/src/main/java/org/crosswire/jsword/book/install/sword jsword/src/main/java/org/crosswire/jsword/book/study jsword/src/main/java/org/crosswire/jsword/examples jsword/src/main/java/org/crosswire/jsword/versification
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Thu Jun 14 04:17:37 MST 2007
Author: dmsmith
Date: 2007-06-14 04:17:36 -0700 (Thu, 14 Jun 2007)
New Revision: 1404
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/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
trunk/common/src/main/java/org/crosswire/common/compress/CompressorType.java
trunk/common/src/main/java/org/crosswire/common/compress/LZSS.java
trunk/common/src/main/java/org/crosswire/common/diff/Distance.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/BookComparators.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/study/StrongsNumber.java
trunk/jsword/src/main/java/org/crosswire/jsword/examples/StrongsAnalysis.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java
Log:
Cleaned up some checkstyle complaints.
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -147,7 +147,7 @@
}
catch (NoSuchVerseException ex)
{
- assert false: ex;
+ assert false : ex;
}
}
});
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -127,7 +127,7 @@
*/
public void clearBookData()
{
- setBookData(null, null);
+ setBookData(null, null);
}
/* (non-Javadoc)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -228,7 +228,7 @@
if (ev.getStateChange() == ItemEvent.SELECTED)
{
JComboBox combo = (JComboBox) ev.getSource();
-
+
Book selected = (Book) combo.getSelectedItem();
fireBooksChosen(new BookSelectEvent(this, getBooks()));
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -870,7 +870,7 @@
DisplaySelectPane selector = view.getSelectPane();
selector.getBiblePicker().enableButtons();
}
- }
+ }
});
}
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -101,7 +101,7 @@
*/
public void clearBookData()
{
- setBookData(null, null);
+ setBookData(null, null);
}
/* (non-Javadoc)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -102,7 +102,7 @@
*/
public void clearBookData()
{
- setBookData(null, null);
+ setBookData(null, null);
}
/* (non-Javadoc)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -93,7 +93,7 @@
*/
public void clearBookData()
{
- setBookData(null, null);
+ setBookData(null, null);
}
/* (non-Javadoc)
@@ -110,7 +110,7 @@
}
else if (bdata == null || !books.equals(bdata.getBooks()) || !key.equals(bdata.getKey()))
{
- bdata = new BookData(books, key, compareBooks);
+ bdata = new BookData(books, key, compareBooks);
}
refresh();
@@ -282,7 +282,6 @@
refresh();
}
}
-
}
private String[] getParts(String reference) throws MalformedURLException
Modified: trunk/common/src/main/java/org/crosswire/common/compress/CompressorType.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/compress/CompressorType.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/common/src/main/java/org/crosswire/common/compress/CompressorType.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -82,7 +82,7 @@
* Get a compressor.
*/
public abstract Compressor getCompressor(byte[] input);
-
+
/**
* Lookup method to convert from a String
*/
Modified: trunk/common/src/main/java/org/crosswire/common/compress/LZSS.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/compress/LZSS.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/common/src/main/java/org/crosswire/common/compress/LZSS.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -188,8 +188,8 @@
{
// Send one character. Remember that code_buf[0] is the
// set of flags for the next eight items.
- matchLength = 1;
- codeBuff[0] |= mask;
+ matchLength = 1;
+ codeBuff[0] |= mask;
codeBuff[codeBufPos++] = ringBuffer[r];
}
else
@@ -286,7 +286,7 @@
// then we must have quit because we ran out of characters
// to process.
while (i++ < lastMatchLength)
- {
+ {
deleteNode(s);
s = (short) ((s + 1) & (RING_SIZE - 1));
@@ -606,7 +606,7 @@
private void deleteNode(short node)
{
assert node >= 0;
- assert node < (RING_SIZE+1);
+ assert node < (RING_SIZE + 1);
short q;
@@ -670,7 +670,7 @@
private int getBytes(byte[] ibuf, int start, int len)
{
int slen = readBuffer.length;
- int realLen = (((slen - readOffset) > len) ? len : slen - readOffset);
+ int realLen = slen - readOffset > len ? len : slen - readOffset;
if (realLen > 0)
{
System.arraycopy(readBuffer, readOffset, ibuf, start, realLen);
@@ -690,7 +690,7 @@
private int getBytes(byte[] ibuf, int len)
{
int slen = readBuffer.length;
- int realLen = (((slen - readOffset) > len) ? len : slen - readOffset);
+ int realLen = slen - readOffset > len ? len : slen - readOffset;
if (realLen > 0)
{
System.arraycopy(readBuffer, readOffset, ibuf, 0, realLen);
Modified: trunk/common/src/main/java/org/crosswire/common/diff/Distance.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/diff/Distance.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/common/src/main/java/org/crosswire/common/diff/Distance.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -32,6 +32,13 @@
public class Distance
{
/**
+ * Prevent instantiation.
+ */
+ private Distance()
+ {
+ }
+
+ /**
* Compute the LevenshteinDistance between two strings.
* See <a href="http://www.merriampark.com/ldjava.htm">www.merriampark.com/ldjava.htm</a> for original implementation.
* @param source the baseline text
@@ -52,7 +59,7 @@
is the 'current working' distance array that maintains the newest distance cost
counts as we iterate through the characters of String s. Each time we increment
the index of String t we are comparing, d is copied to p, the second int[]. Doing so
- allows us to retain the previous cost counts as required by the algorithm (taking
+ allows us to retain the previous cost counts as required by the algorithm (taking
the minimum of the cost count to the left, up one, and diagonally up and to the left
of the current cost count being calculated). (Note that the arrays aren't really
copied anymore, just switched...this is clearly much better than cloning an array
@@ -60,7 +67,7 @@
Effectively, the difference between the two implementations is this one does not
cause an out of memory condition when calculating the LD over two very large strings.
- */
+ */
int sourceLength = source.length(); // length of source
int targetLength = target.length(); // length of target
@@ -74,9 +81,9 @@
return sourceLength;
}
- int prevDist[] = new int[sourceLength + 1]; //'previous' cost array, horizontally
- int dist[] = new int[sourceLength + 1]; // cost array, horizontally
- int swap[]; //placeholder to assist in swapping prevDist and dist
+ int[] prevDist = new int[sourceLength + 1]; //'previous' cost array, horizontally
+ int[] dist = new int[sourceLength + 1]; // cost array, horizontally
+ int[] swap; //placeholder to assist in swapping prevDist and dist
// indexes into strings source and target
int i; // iterates through source
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookComparators.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookComparators.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookComparators.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -50,9 +50,8 @@
{
public int compare(Object o1, Object o2)
{
- return ((Book)o1).compareTo(o2);
+ return ((Book) o1).compareTo(o2);
}
-
};
}
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -248,7 +248,7 @@
String thisText = ""; //$NON-NLS-1$
if (content instanceof Element)
{
- thisText = OSISUtil.getCanonicalText((Element)content);
+ thisText = OSISUtil.getCanonicalText((Element) content);
}
else if (content instanceof Text)
{
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -849,7 +849,7 @@
if (content instanceof Element)
{
Element element = (Element) content;
-
+
// Ignore extra-biblical text
if (EXTRA_BIBLICAL_ELEMENTS.contains(element.getName()))
{
@@ -857,7 +857,7 @@
result = Boolean.valueOf(canonical).booleanValue();
}
}
-
+
return result;
}
@@ -950,7 +950,7 @@
public static List diffToOsis(List diffs)
{
Element div = factory().createDiv();
-
+
for (int x = 0; x < diffs.size(); x++)
{
Difference diff = (Difference) diffs.get(x);
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -118,7 +118,6 @@
}
URI configURI = NetUtil.getURI(conf);
-
URI remote = toRemoteURI(book);
return NetUtil.isNewer(remote, configURI, proxyHost, proxyPort);
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/study/StrongsNumber.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/study/StrongsNumber.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/study/StrongsNumber.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -152,6 +152,8 @@
case 'h':
language = 'H';
break;
+ default:
+ assert false : "Cannot get here"; //$NON-NLS-1$
}
// Get the number after the G or H
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/examples/StrongsAnalysis.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/examples/StrongsAnalysis.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/examples/StrongsAnalysis.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -1,3 +1,24 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2007
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id: DictToOsis.java 1344 2007-05-23 21:50:52 -0400 (Wed, 23 May 2007) dmsmith $
+ */
package org.crosswire.jsword.examples;
import java.util.ArrayList;
@@ -19,9 +40,18 @@
import org.crosswire.jsword.passage.Key;
import org.jdom.Element;
+/**
+ * Analyze Strong's Numbers in a module.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
public class StrongsAnalysis
{
-
+ /**
+ *
+ */
public StrongsAnalysis()
{
Book bible = Books.installed().getBook("KJV"); //$NON-NLS-1$
@@ -46,6 +76,12 @@
analyze(sms, bible, errors, bible.getGlobalKeyList());
}
+ /**
+ * @param sms
+ * @param book
+ * @param errors
+ * @param wholeBible
+ */
public void analyze(StrongsMapSet sms, Book book, List errors, Key wholeBible)
{
Key subkey = null;
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java 2007-06-14 02:40:15 UTC (rev 1403)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java 2007-06-14 11:17:36 UTC (rev 1404)
@@ -26,7 +26,6 @@
import org.crosswire.common.util.StringUtil;
import org.crosswire.jsword.book.CaseType;
-import org.crosswire.jsword.passage.NoSuchVerseException;
/**
* BookName represents the different ways a book of the bible is named.
@@ -159,7 +158,6 @@
*/
public boolean match(String normalizedName)
{
-
// Does it match one of the alternative versions
for (int j = 0; j < alternateNames.length; j++)
{
More information about the jsword-svn
mailing list