From jswordcvs at crosswire.org Sat Jan 15 04:52:11 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 04:52:13 2005 Subject: [jsword-svn] bibledesktop-web/web s Message-ID: <200501151152.j0FBqBq3030844@www.crosswire.org> Update of /cvs/jsword/bibledesktop-web/web In directory www.crosswire.org:/tmp/cvs-serv30787/web Modified Files: bibledesktop-manual.pdf Added Files: bibledesktop-manual.doc Log Message: user manual update Index: bibledesktop-manual.pdf =================================================================== RCS file: /cvs/jsword/bibledesktop-web/web/bibledesktop-manual.pdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsoMmRY6 and /tmp/cvsvaAiYF differ --- NEW FILE: bibledesktop-manual.doc --- (This appears to be a binary file; contents omitted.) From jswordcvs at crosswire.org Sat Jan 15 04:52:47 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 04:52:49 2005 Subject: [jsword-svn] jsword-support s Message-ID: <200501151152.j0FBql93030873@www.crosswire.org> Update of /cvs/jsword/jsword-support In directory www.crosswire.org:/tmp/cvs-serv30869 Modified Files: .classpath Log Message: les deps Index: .classpath =================================================================== RCS file: /cvs/jsword/jsword-support/.classpath,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .classpath 25 Jun 2004 11:19:26 -0000 1.1 --- .classpath 15 Jan 2005 11:52:45 -0000 1.2 *************** *** 6,11 **** - - --- 6,9 ---- From jswordcvs at crosswire.org Sat Jan 15 05:05:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 05:05:37 2005 Subject: [jsword-svn] common/java/core/org/crosswire/common/util s Message-ID: <200501151205.j0FC5ZbC031110@www.crosswire.org> Update of /cvs/jsword/common/java/core/org/crosswire/common/util In directory www.crosswire.org:/tmp/cvs-serv31101/java/core/org/crosswire/common/util Modified Files: LucidException.java LucidRuntimeException.java NetUtil.java CallContext.java Log Message: general tidy-ups Index: LucidRuntimeException.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/LucidRuntimeException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LucidRuntimeException.java 16 Aug 2004 22:07:35 -0000 1.3 --- LucidRuntimeException.java 15 Jan 2005 12:05:33 -0000 1.4 *************** *** 13,17 **** * before you used it, however EventExceptions would be used directly. *

! * *

*
--- 13,17 ---- * before you used it, however EventExceptions would be used directly. *

! * *

*
*************** *** 79,83 **** super(msg.toString(), cause); ! this.params = params; } --- 79,83 ---- super(msg.toString(), cause); ! this.params = (Object[]) params.clone(); } *************** *** 101,106 **** catch (IllegalArgumentException ex) { ! log.warn("Format fail for '" + out + "'", ex); //$NON-NLS-1$ //$NON-NLS-2$ ! return "Error formatting message '" + out + "'"; //$NON-NLS-1$ //$NON-NLS-2$ } } --- 101,106 ---- catch (IllegalArgumentException ex) { ! log.warn("Format fail for '" + out + '\'', ex); //$NON-NLS-1$ ! return "Error formatting message '" + out + '\''; //$NON-NLS-1$ } } Index: LucidException.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/LucidException.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LucidException.java 16 Aug 2004 22:07:35 -0000 1.4 --- LucidException.java 15 Jan 2005 12:05:33 -0000 1.5 *************** *** 88,92 **** super(msg.toString(), cause); this.deprecated = false; ! this.params = params; } --- 88,92 ---- super(msg.toString(), cause); this.deprecated = false; ! this.params = (Object[]) params.clone(); } *************** *** 110,115 **** catch (IllegalArgumentException ex) { ! log.warn("Format fail for '" + out + "'", ex); //$NON-NLS-1$ //$NON-NLS-2$ ! return "Error formatting message '" + out + "'"; //$NON-NLS-1$ //$NON-NLS-2$ } } --- 110,115 ---- catch (IllegalArgumentException ex) { ! log.warn("Format fail for '" + out + '\'', ex); //$NON-NLS-1$ ! return "Error formatting message '" + out + '\''; //$NON-NLS-1$ } } Index: NetUtil.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/NetUtil.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NetUtil.java 15 Oct 2004 23:28:17 -0000 1.15 --- NetUtil.java 15 Jan 2005 12:05:33 -0000 1.16 *************** *** 16,19 **** --- 16,20 ---- import java.util.Arrays; import java.util.List; + import java.util.Date; import java.util.jar.JarEntry; *************** *** 502,506 **** // with #, not the index file itself and acceptable by the filter. if (name.length() > 0 ! && !name.startsWith("#") //$NON-NLS-1$ && !name.equals(INDEX_FILE) && filter.accept(name)) --- 503,507 ---- // with #, not the index file itself and acceptable by the filter. if (name.length() > 0 ! && name.charAt(0) != '#' && !name.equals(INDEX_FILE) && filter.accept(name)) *************** *** 537,571 **** public static long getLastModified(URL url) { - long time = 0; - URLConnection urlConnection = null; try { ! urlConnection = url.openConnection(); ! time = urlConnection.getLastModified(); ! } ! catch (IOException e) ! { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } ! // If it were a jar then time contains the last modified date of the jar. ! if (urlConnection instanceof JarURLConnection) ! { ! // form is jar:file:.../xxx.jar!.../filename.ext ! JarURLConnection jarConnection = (JarURLConnection) urlConnection; ! JarEntry jarEntry = null; ! try ! { ! jarEntry = jarConnection.getJarEntry(); ! } ! catch (IOException e2) { ! assert false; } - time = jarEntry.getTime(); - } ! return time; } --- 538,562 ---- public static long getLastModified(URL url) { try { ! URLConnection urlConnection = url.openConnection(); ! long time = urlConnection.getLastModified(); ! // If it were a jar then time contains the last modified date of the jar. ! if (urlConnection instanceof JarURLConnection) { ! // form is jar:file:.../xxx.jar!.../filename.ext ! JarURLConnection jarConnection = (JarURLConnection) urlConnection; ! JarEntry jarEntry = jarConnection.getJarEntry(); ! time = jarEntry.getTime(); } ! return time; ! } ! catch (IOException ex) ! { ! log.warn("Failed to get modified time", ex); //$NON-NLS-1$ ! return new Date().getTime(); ! } } *************** *** 652,656 **** log.error("Failed to create URL", ex); //$NON-NLS-1$ assert false; ! throw new IllegalArgumentException(); } } --- 643,647 ---- log.error("Failed to create URL", ex); //$NON-NLS-1$ assert false; ! throw new IllegalArgumentException(ex.toString()); } } *************** *** 695,699 **** * Where are temporary files cached. */ ! private static File cachedir; /** --- 686,690 ---- * Where are temporary files cached. */ ! private static File cachedir = null; /** Index: CallContext.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/CallContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CallContext.java 8 Sep 2004 19:54:24 -0000 1.2 --- CallContext.java 15 Jan 2005 12:05:33 -0000 1.3 *************** *** 6,10 **** *

* It has been tested to work in command line and WebStart environments. ! * *

*
--- 6,10 ---- *

* It has been tested to work in command line and WebStart environments. ! * *

*
*************** *** 91,98 **** * Offset needed to represent the caller of the method * that called this method. ! * */ private static final int CALL_CONTEXT_OFFSET = 3; ! private static CallContext resolver; } --- 91,98 ---- * Offset needed to represent the caller of the method * that called this method. ! * */ private static final int CALL_CONTEXT_OFFSET = 3; ! private static CallContext resolver = null; } From jswordcvs at crosswire.org Sat Jan 15 05:05:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 05:05:37 2005 Subject: [jsword-svn] common/java/config/org/crosswire/common/config/swing s Message-ID: <200501151205.j0FC5ZU0031118@www.crosswire.org> Update of /cvs/jsword/common/java/config/org/crosswire/common/config/swing In directory www.crosswire.org:/tmp/cvs-serv31101/java/config/org/crosswire/common/config/swing Modified Files: ConfigEditorFactory.java AbstractConfigEditor.java AdvancedConfigEditor.java WizardConfigEditor.java ConfigEditor.java TreeConfigEditor.java TabbedConfigEditor.java Log Message: general tidy-ups Index: WizardConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/WizardConfigEditor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WizardConfigEditor.java 21 Sep 2004 17:45:47 -0000 1.5 --- WizardConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.6 *************** *** 69,73 **** * so don't use field initializers. */ ! protected void initialize() { actions = new ActionFactory(WizardConfigEditor.class, this); --- 69,73 ---- * so don't use field initializers. */ ! protected void initializeGUI() { actions = new ActionFactory(WizardConfigEditor.class, this); Index: TreeConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/TreeConfigEditor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TreeConfigEditor.java 16 Aug 2004 22:07:35 -0000 1.4 --- TreeConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.5 *************** *** 61,65 **** * so don't use field initializers. */ ! protected void initialize() { JPanel panel = new JPanel(); --- 61,65 ---- * so don't use field initializers. */ ! protected void initializeGUI() { JPanel panel = new JPanel(); *************** *** 248,254 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 248,254 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256720688860576049L; /** Index: AbstractConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/AbstractConfigEditor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AbstractConfigEditor.java 8 Sep 2004 19:54:24 -0000 1.5 --- AbstractConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.6 *************** *** 53,61 **** * @see org.crosswire.common.config.swing.ConfigEditor#init(org.crosswire.common.config.Config) */ ! public void init(Config aConfig) { this.config = aConfig; ! initialize(); config.addConfigListener(new ConfigListener() --- 53,61 ---- * @see org.crosswire.common.config.swing.ConfigEditor#init(org.crosswire.common.config.Config) */ ! public void construct(Config aConfig) { this.config = aConfig; ! initializeGUI(); config.addConfigListener(new ConfigListener() *************** *** 122,129 **** /** ! * Now this wasn't created with JBuilder but maybe, just maybe, by ! * calling my method this, JBuilder may grok it. */ ! protected abstract void initialize(); /** --- 122,128 ---- /** ! * Create the GUI */ ! protected abstract void initializeGUI(); /** Index: TabbedConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/TabbedConfigEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TabbedConfigEditor.java 16 Aug 2004 22:07:35 -0000 1.2 --- TabbedConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.3 *************** *** 45,49 **** * so don't use field initializers. */ ! protected void initialize() { JComponent bar = new ButtonPane(this); --- 45,49 ---- * so don't use field initializers. */ ! protected void initializeGUI() { JComponent bar = new ButtonPane(this); *************** *** 154,156 **** --- 154,161 ---- */ protected static final ImageIcon TAB_ICON = null; + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3256444715753878326L; } Index: ConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/ConfigEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigEditor.java 28 Apr 2004 22:35:38 -0000 1.1 --- ConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.2 *************** *** 37,41 **** * @param config The configurable settings */ ! public void init(Config config); /** --- 37,41 ---- * @param config The configurable settings */ ! public void construct(Config config); /** Index: AdvancedConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/AdvancedConfigEditor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AdvancedConfigEditor.java 8 Sep 2004 19:54:24 -0000 1.4 --- AdvancedConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.5 *************** *** 47,53 **** public class AdvancedConfigEditor extends TreeConfigEditor { ! /** ! * Now this wasn't created with JBuilder but maybe, just maybe, by ! * calling my method this, JBuilder may grok it. */ protected void jbInit() --- 47,52 ---- public class AdvancedConfigEditor extends TreeConfigEditor { ! /** ! * WARNING: this code is not called from anywhere and is probably broken */ protected void jbInit() *************** *** 161,165 **** { Object obj = tree.getLastSelectedPathComponent(); ! if (obj == null) return; title.setText(obj + Msg.PROPERTIES.toString()); --- 160,167 ---- { Object obj = tree.getLastSelectedPathComponent(); ! if (obj == null) ! { ! return; ! } title.setText(obj + Msg.PROPERTIES.toString()); *************** *** 198,201 **** --- 200,208 ---- /** + * Serialization ID + */ + private static final long serialVersionUID = 3616451198199345203L; + + /** * A custom data model for the TreeConfig Tree * @author Joe Walker *************** *** 225,232 **** // Chop off all after the first dot ! int dot_pos = temp.indexOf("."); //$NON-NLS-1$ ! if (dot_pos != -1) { ! temp = temp.substring(0, dot_pos); } --- 232,239 ---- // Chop off all after the first dot ! int dotPos = temp.indexOf("."); //$NON-NLS-1$ ! if (dotPos != -1) { ! temp = temp.substring(0, dotPos); } *************** *** 361,364 **** --- 368,376 ---- return comp; } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3256720688860576049L; } } Index: ConfigEditorFactory.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/ConfigEditorFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfigEditorFactory.java 16 Aug 2004 22:07:35 -0000 1.3 --- ConfigEditorFactory.java 15 Jan 2005 12:05:33 -0000 1.4 *************** *** 58,62 **** { ConfigEditor base = (ConfigEditor) ClassUtil.getImplementation(ConfigEditor.class); ! base.init(config); base.showDialog(parent, al); } --- 58,62 ---- { ConfigEditor base = (ConfigEditor) ClassUtil.getImplementation(ConfigEditor.class); ! base.construct(config); base.showDialog(parent, al); } From jswordcvs at crosswire.org Sat Jan 15 05:05:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 05:05:37 2005 Subject: [jsword-svn] common/java/swing/org/crosswire/common/swing s Message-ID: <200501151205.j0FC5ZBP031130@www.crosswire.org> Update of /cvs/jsword/common/java/swing/org/crosswire/common/swing In directory www.crosswire.org:/tmp/cvs-serv31101/java/swing/org/crosswire/common/swing Modified Files: FormPane.java RowTableModel.java Log Message: general tidy-ups Index: RowTableModel.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/RowTableModel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RowTableModel.java 21 Sep 2004 17:45:47 -0000 1.2 --- RowTableModel.java 15 Jan 2005 12:05:33 -0000 1.3 *************** *** 1,73 **** - /* - * Distribution Licence: - * JSword is free software; you can redistribute it - * and/or modify it under the terms of the GNU General Public License, - * version 2 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 General Public License for more details. - * The License is available on the internet at: - * http://www.gnu.org/copyleft/gpl.html, - * or by writing to: - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307, USA - * - * The copyright to this program is held by it's authors - * Copyright: 2004 - */ package org.crosswire.common.swing; import java.util.List; import javax.swing.table.AbstractTableModel; /** ! * The RowTableModel defines the "model" behaviour for ! * a RowTable. * ! * @author DM Smith [ dmsmith555 at yahoo dot com] */ public class RowTableModel extends AbstractTableModel { /** - * Field list contains the objects that can be worked upon - */ - private List list; - - /** - * Field columnModel provides the definition of the structure - * of the table - */ - private RowColumns rowColumnModel; - - /** - * Field indexes provides a look-aside for the sorted view of the - * table to the row list. - */ - private int[] indexes; - - /** - * Field keys provides the primary or composite key of the table. - * It is a local optimization of columnModel.getSortKeys(). - */ - private int[] keys; - /** - * Field sortColumn indicates the column that was last sorted upon. - * It is initialized the first value in keys, if present otherwise -1 - */ - private int sortColumn; - - /** * Builds a RowTable model for the provided (non-null) row list, * using the provided row column definition. ! * @param aList List */ ! public RowTableModel(List aList, RowColumns aRowColumnModel) { ! super(); ! list = aList; rowColumnModel = aRowColumnModel; keys = rowColumnModel.getSortKeys(); --- 1,46 ---- package org.crosswire.common.swing; import java.util.List; + import java.util.ArrayList; import javax.swing.table.AbstractTableModel; /** ! * The RowTableModel defines the "model" behaviour for a RowTable. * ! *

! *
! * ! * Distribution Licence:
! * JSword is free software; you can redistribute it ! * and/or modify it under the terms of the GNU General Public License, ! * version 2 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 ! * General Public License for more details.
! * The License is available on the internet ! * here, or by writing to: ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ! * MA 02111-1307, USA
! * The copyright to this program is held by it's authors. ! *
! * @see gnu.gpl.Licence ! * @author DM Smith [dmsmith555 at yahoo dot com] ! * @author Joe Walker [joe at eireneh dot com] ! * @version $Id$ */ public class RowTableModel extends AbstractTableModel { /** * Builds a RowTable model for the provided (non-null) row list, * using the provided row column definition. ! * @param newList List */ ! public RowTableModel(List newList, RowColumns aRowColumnModel) { ! list = new ArrayList(); ! list.addAll(newList); ! rowColumnModel = aRowColumnModel; keys = rowColumnModel.getSortKeys(); *************** *** 97,101 **** /** ! * Method getValueAt returns the contents of a cell. * @param row int * @param column int --- 70,74 ---- /** ! * Method getValueAt returns the contents of a cell. * @param row int * @param column int *************** *** 342,344 **** --- 315,350 ---- } + /** + * Serialization ID + */ + private static final long serialVersionUID = 3761126033281463602L; + + /** + * Field list contains the objects that can be worked upon + */ + private List list; + + /** + * Field columnModel provides the definition of the structure + * of the table + */ + private RowColumns rowColumnModel; + + /** + * Field indexes provides a look-aside for the sorted view of the + * table to the row list. + */ + private int[] indexes; + + /** + * Field keys provides the primary or composite key of the table. + * It is a local optimization of columnModel.getSortKeys(). + */ + private int[] keys; + + /** + * Field sortColumn indicates the column that was last sorted upon. + * It is initialized the first value in keys, if present otherwise -1 + */ + private int sortColumn; } Index: FormPane.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/FormPane.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FormPane.java 16 Aug 2004 22:07:35 -0000 1.2 --- FormPane.java 15 Jan 2005 12:05:33 -0000 1.3 *************** *** 34,40 **** public class FormPane extends JPanel { - private static final String SUFFIX_COMP = "_comp"; //$NON-NLS-1$ - private static final String SUFFIX_LABEL = "_label"; //$NON-NLS-1$ - /** * Create a FormPane --- 34,37 ---- *************** *** 93,100 **** int count = getComponentCount() / 2; String[] list = new String[count]; ! JLabel label; for (int i = 0; i < count; i++) { ! label = (JLabel) getComponent(i * 2); list[i] = label.getText(); } --- 90,97 ---- int count = getComponentCount() / 2; String[] list = new String[count]; ! for (int i = 0; i < count; i++) { ! JLabel label = (JLabel) getComponent(i * 2); list[i] = label.getText(); } *************** *** 120,123 **** --- 117,128 ---- } + private static final String SUFFIX_COMP = "_comp"; //$NON-NLS-1$ + private static final String SUFFIX_LABEL = "_label"; //$NON-NLS-1$ + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3258135738867790641L; + /** * A store of the available components From jswordcvs at crosswire.org Sat Jan 15 05:05:39 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sat Jan 15 05:05:41 2005 Subject: [jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/book s Message-ID: <200501151205.j0FC5dsK031186@www.crosswire.org> Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book In directory www.crosswire.org:/tmp/cvs-serv31150/java/main/org/crosswire/bibledesktop/book Modified Files: BooksComboBoxModel.java Log Message: general tidy-ups Index: BooksComboBoxModel.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/BooksComboBoxModel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BooksComboBoxModel.java 9 Sep 2004 20:15:57 -0000 1.5 --- BooksComboBoxModel.java 15 Jan 2005 12:05:37 -0000 1.6 *************** *** 10,14 **** * The BibleModels class implements a number of swing DataModels * and gives access to the list of current Bibles. ! * *

*
--- 10,14 ---- * The BibleModels class implements a number of swing DataModels * and gives access to the list of current Bibles. ! * *

*
*************** *** 49,52 **** --- 49,54 ---- super(filter); + postCacheData(); + if (getSize() > 0) { *************** *** 107,114 **** * @see org.crosswire.bibledesktop.book.BooksListModel#cacheData() */ ! protected void cacheData() { - super.cacheData(); - // Find the previously selected item boolean found = false; --- 109,114 ---- * @see org.crosswire.bibledesktop.book.BooksListModel#cacheData() */ ! protected final synchronized void postCacheData() { // Find the previously selected item boolean found = false; *************** *** 141,143 **** --- 141,148 ---- */ protected BookMetaData current; + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3906362740397388593L; } From jswordcvs at crosswire.org Mon Jan 24 16:22:08 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:22:09 2005 Subject: [jsword-svn] common/java/config/org/crosswire/common/config/swing s Message-ID: <200501242322.j0ONM8fX022283@www.crosswire.org> Update of /cvs/jsword/common/java/config/org/crosswire/common/config/swing In directory www.crosswire.org:/tmp/cvs-serv22275/java/config/org/crosswire/common/config/swing Modified Files: FileField.java PathField.java BooleanField.java WizardConfigEditor.java ButtonPane.java ColorField.java Log Message: Added or changed serialVersionUID to real value Index: WizardConfigEditor.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/WizardConfigEditor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WizardConfigEditor.java 15 Jan 2005 12:05:33 -0000 1.6 --- WizardConfigEditor.java 24 Jan 2005 23:22:06 -0000 1.7 *************** *** 320,325 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 320,325 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258416148742484276L; } Index: ButtonPane.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/ButtonPane.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ButtonPane.java 30 Aug 2004 09:27:27 -0000 1.5 --- ButtonPane.java 24 Jan 2005 23:22:06 -0000 1.6 *************** *** 114,119 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 114,119 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257847701248031033L; } Index: PathField.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/PathField.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PathField.java 16 Aug 2004 22:07:35 -0000 1.5 --- PathField.java 24 Jan 2005 23:22:06 -0000 1.6 *************** *** 201,206 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 201,206 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256443607736072242L; } Index: FileField.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/FileField.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileField.java 16 Aug 2004 22:07:35 -0000 1.4 --- FileField.java 24 Jan 2005 23:22:06 -0000 1.5 *************** *** 104,109 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 104,109 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258416148742484276L; } Index: ColorField.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/ColorField.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ColorField.java 16 Aug 2004 22:07:35 -0000 1.4 --- ColorField.java 24 Jan 2005 23:22:06 -0000 1.5 *************** *** 116,122 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 116,122 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3617291237934053686L; /** Index: BooleanField.java =================================================================== RCS file: /cvs/jsword/common/java/config/org/crosswire/common/config/swing/BooleanField.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BooleanField.java 2 Sep 2004 17:44:23 -0000 1.4 --- BooleanField.java 24 Jan 2005 23:22:06 -0000 1.5 *************** *** 119,124 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 119,124 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3617291237934053686L; } From jswordcvs at crosswire.org Mon Jan 24 16:22:08 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:22:10 2005 Subject: [jsword-svn] common/java/core/org/crosswire/common/util s Message-ID: <200501242322.j0ONM8v9022292@www.crosswire.org> Update of /cvs/jsword/common/java/core/org/crosswire/common/util In directory www.crosswire.org:/tmp/cvs-serv22275/java/core/org/crosswire/common/util Modified Files: LucidException.java LucidRuntimeException.java EventListenerList.java Log Message: Added or changed serialVersionUID to real value Index: LucidRuntimeException.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/LucidRuntimeException.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LucidRuntimeException.java 15 Jan 2005 12:05:33 -0000 1.4 --- LucidRuntimeException.java 24 Jan 2005 23:22:06 -0000 1.5 *************** *** 112,118 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 112,118 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3906091143962965817L; /** Index: EventListenerList.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/EventListenerList.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EventListenerList.java 28 Nov 2004 21:36:31 -0000 1.6 --- EventListenerList.java 24 Jan 2005 23:22:06 -0000 1.7 *************** *** 267,272 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 267,272 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256999960636436785L; } Index: LucidException.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/LucidException.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LucidException.java 15 Jan 2005 12:05:33 -0000 1.5 --- LucidException.java 24 Jan 2005 23:22:06 -0000 1.6 *************** *** 144,150 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 144,150 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257846580311963191L; /** From jswordcvs at crosswire.org Mon Jan 24 16:22:08 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:22:10 2005 Subject: [jsword-svn] common/java/swing/org/crosswire/common/swing s Message-ID: <200501242322.j0ONM8k7022301@www.crosswire.org> Update of /cvs/jsword/common/java/swing/org/crosswire/common/swing In directory www.crosswire.org:/tmp/cvs-serv22275/java/swing/org/crosswire/common/swing Modified Files: MapTable.java AbstractLayout.java MapTableModel.java BeanPanel.java CWAction.java Log Message: Added or changed serialVersionUID to real value Index: CWAction.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/CWAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CWAction.java 8 Sep 2004 19:54:24 -0000 1.3 --- CWAction.java 24 Jan 2005 23:22:06 -0000 1.4 *************** *** 122,127 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 122,127 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258416148742484276L; } Index: MapTable.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/MapTable.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MapTable.java 8 Sep 2004 19:54:24 -0000 1.5 --- MapTable.java 24 Jan 2005 23:22:06 -0000 1.6 *************** *** 135,140 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 135,140 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3906091143962965817L; } Index: MapTableModel.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/MapTableModel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MapTableModel.java 30 Aug 2004 09:27:27 -0000 1.3 --- MapTableModel.java 24 Jan 2005 23:22:06 -0000 1.4 *************** *** 263,269 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 263,269 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3546365041277352241L; /** Index: BeanPanel.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/BeanPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanPanel.java 16 Aug 2004 22:07:35 -0000 1.2 --- BeanPanel.java 24 Jan 2005 23:22:06 -0000 1.3 *************** *** 165,171 **** /** ! * SERIALUID(dm): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 165,171 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3834589894202175795L; /** Index: AbstractLayout.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/AbstractLayout.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractLayout.java 28 Nov 2004 21:36:31 -0000 1.7 --- AbstractLayout.java 24 Jan 2005 23:22:06 -0000 1.8 *************** *** 177,184 **** protected int vgap; - /** - * SERIALUID(dm): A placeholder for the ultimate version id. - */ - private static final long serialVersionUID = 1L; - } --- 177,179 ---- From jswordcvs at crosswire.org Mon Jan 24 16:23:15 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:23:17 2005 Subject: [jsword-svn] jsword-sword/java/main/org/crosswire/sword/mgr s Message-ID: <200501242323.j0ONNF7Q022373@www.crosswire.org> Update of /cvs/jsword/jsword-sword/java/main/org/crosswire/sword/mgr In directory www.crosswire.org:/tmp/cvs-serv22369/java/main/org/crosswire/sword/mgr Modified Files: SWConfig.java Log Message: Refactored local variable "enum" to "iter", as it is a reserved word in Java 1.5 Index: SWConfig.java =================================================================== RCS file: /cvs/jsword/jsword-sword/java/main/org/crosswire/sword/mgr/SWConfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SWConfig.java 20 Apr 2004 22:29:08 -0000 1.1 --- SWConfig.java 24 Jan 2005 23:23:13 -0000 1.2 *************** *** 69,76 **** } ! private Iterator enumToIterator(Enumeration enum) { List list = new LinkedList(); ! while( enum.hasMoreElements() ) ! list.add( enum.nextElement() ); return list.iterator(); } --- 69,76 ---- } ! private Iterator enumToIterator(Enumeration iter) { List list = new LinkedList(); ! while( iter.hasMoreElements() ) ! list.add( iter.nextElement() ); return list.iterator(); } From jswordcvs at crosswire.org Mon Jan 24 16:24:21 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:24:23 2005 Subject: [jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/book s Message-ID: <200501242324.j0ONOLAv022414@www.crosswire.org> Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book In directory www.crosswire.org:/tmp/cvs-serv22410/java/main/org/crosswire/bibledesktop/book Modified Files: DisplaySelectPane.java EditSitePane.java SitesPane.java BooksListModel.java PassageSelectionPane.java BibleComboBoxModel.java BibleViewPane.java DictionaryPane.java Log Message: Added or changed serialVersionUID to real value Index: BooksListModel.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/BooksListModel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BooksListModel.java 28 Nov 2004 21:36:04 -0000 1.6 --- BooksListModel.java 24 Jan 2005 23:24:19 -0000 1.7 *************** *** 215,220 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 215,220 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257568408165036595L; } Index: DisplaySelectPane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/DisplaySelectPane.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DisplaySelectPane.java 10 Oct 2004 22:12:11 -0000 1.17 --- DisplaySelectPane.java 24 Jan 2005 23:24:19 -0000 1.18 *************** *** 607,612 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 607,612 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256446910616057650L; } Index: SitesPane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/SitesPane.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SitesPane.java 28 Nov 2004 21:36:04 -0000 1.10 --- SitesPane.java 24 Jan 2005 23:24:19 -0000 1.11 *************** *** 226,231 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 226,231 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258126947069605936L; } Index: PassageSelectionPane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/PassageSelectionPane.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PassageSelectionPane.java 28 Nov 2004 21:36:04 -0000 1.13 --- PassageSelectionPane.java 24 Jan 2005 23:24:19 -0000 1.14 *************** *** 428,434 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 428,434 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3546920298944673072L; /** Index: BibleViewPane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/BibleViewPane.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** BibleViewPane.java 9 Oct 2004 21:45:24 -0000 1.11 --- BibleViewPane.java 24 Jan 2005 23:24:19 -0000 1.12 *************** *** 377,383 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 377,383 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258415036346282038L; /** Index: BibleComboBoxModel.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/BibleComboBoxModel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BibleComboBoxModel.java 28 Nov 2004 21:36:04 -0000 1.5 --- BibleComboBoxModel.java 24 Jan 2005 23:24:19 -0000 1.6 *************** *** 281,286 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 281,286 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3616449020667442997L; } Index: EditSitePane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/EditSitePane.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** EditSitePane.java 28 Nov 2004 21:36:04 -0000 1.10 --- EditSitePane.java 24 Jan 2005 23:24:19 -0000 1.11 *************** *** 593,598 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 593,598 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256446910616057650L; } Index: DictionaryPane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/DictionaryPane.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DictionaryPane.java 9 Sep 2004 20:15:57 -0000 1.13 --- DictionaryPane.java 24 Jan 2005 23:24:19 -0000 1.14 *************** *** 363,368 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 363,368 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3616449020667442997L; } From jswordcvs at crosswire.org Mon Jan 24 16:25:21 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:25:22 2005 Subject: [jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/desktop s Message-ID: <200501242325.j0ONPLna022470@www.crosswire.org> Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop In directory www.crosswire.org:/tmp/cvs-serv22456/java/main/org/crosswire/bibledesktop/desktop Modified Files: ViewSourcePane.java Log Message: Added or changed serialVersionUID to real value Index: ViewSourcePane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/ViewSourcePane.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ViewSourcePane.java 2 Sep 2004 17:44:46 -0000 1.8 --- ViewSourcePane.java 24 Jan 2005 23:25:18 -0000 1.9 *************** *** 156,161 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 156,161 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257281435579985975L; } From jswordcvs at crosswire.org Mon Jan 24 16:25:20 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:25:22 2005 Subject: [jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/passage s Message-ID: <200501242325.j0ONPKBG022462@www.crosswire.org> Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage In directory www.crosswire.org:/tmp/cvs-serv22456/java/main/org/crosswire/bibledesktop/passage Modified Files: PassageListModel.java KeyTreeCellRenderer.java PassageListCellRenderer.java Log Message: Added or changed serialVersionUID to real value Index: PassageListCellRenderer.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/PassageListCellRenderer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PassageListCellRenderer.java 28 Nov 2004 21:36:04 -0000 1.7 --- PassageListCellRenderer.java 24 Jan 2005 23:25:18 -0000 1.8 *************** *** 132,137 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 132,137 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3978423624430270256L; } Index: KeyTreeCellRenderer.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/KeyTreeCellRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeyTreeCellRenderer.java 16 Aug 2004 22:09:21 -0000 1.3 --- KeyTreeCellRenderer.java 24 Jan 2005 23:25:18 -0000 1.4 *************** *** 63,68 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 63,68 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3545232531516765241L; } Index: PassageListModel.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/PassageListModel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PassageListModel.java 28 Nov 2004 21:36:04 -0000 1.9 --- PassageListModel.java 24 Jan 2005 23:25:18 -0000 1.10 *************** *** 243,248 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 243,248 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3761692273179964725L; } From jswordcvs at crosswire.org Mon Jan 24 16:27:01 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:27:02 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s Message-ID: <200501242327.j0ONR1It022532@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book In directory www.crosswire.org:/tmp/cvs-serv22528/java/jsword/org/crosswire/jsword/book Modified Files: IndexStatus.java CaseType.java Openness.java BookType.java Log Message: Added or changed serialVersionUID to real value Index: Openness.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Openness.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Openness.java 21 Sep 2004 17:46:23 -0000 1.10 --- Openness.java 24 Jan 2005 23:26:59 -0000 1.11 *************** *** 140,146 **** COMMERCIAL }; /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 140,147 ---- COMMERCIAL }; + /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257844364125483320L; } Index: IndexStatus.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/IndexStatus.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IndexStatus.java 9 Oct 2004 21:45:05 -0000 1.1 --- IndexStatus.java 24 Jan 2005 23:26:59 -0000 1.2 *************** *** 137,142 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 137,142 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256718472791537204L; } Index: BookType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookType.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BookType.java 9 Oct 2004 21:45:05 -0000 1.7 --- BookType.java 24 Jan 2005 23:26:59 -0000 1.8 *************** *** 134,139 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 134,139 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3256727260177708345L; } Index: CaseType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/CaseType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CaseType.java 8 Sep 2004 19:55:07 -0000 1.3 --- CaseType.java 24 Jan 2005 23:26:59 -0000 1.4 *************** *** 32,40 **** public static final CaseType LOWER = new CaseType("LOWER") //$NON-NLS-1$ { - public String setCase(String word) { return word.toLowerCase(); } }; --- 32,44 ---- public static final CaseType LOWER = new CaseType("LOWER") //$NON-NLS-1$ { public String setCase(String word) { return word.toLowerCase(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3546637707360286256L; }; *************** *** 69,72 **** --- 73,81 ---- + "-" + toSentenceCase(word.substring(index + 1)); //$NON-NLS-1$ } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3905520510312985138L; }; *************** *** 77,80 **** --- 86,94 ---- return word.toUpperCase(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257002163871035698L; }; *************** *** 90,93 **** --- 104,112 ---- throw new IllegalArgumentException(Msg.ERROR_MIXED.toString()); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3546925766555547956L; }; From jswordcvs at crosswire.org Mon Jan 24 16:28:03 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:28:04 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install/sword s Message-ID: <200501242328.j0ONS3h8022565@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword In directory www.crosswire.org:/tmp/cvs-serv22561/java/jsword/org/crosswire/jsword/book/install/sword Modified Files: AbstractSwordInstaller.java Log Message: Used symbolic constant in place of string literal. Index: AbstractSwordInstaller.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractSwordInstaller.java 16 Oct 2004 09:07:43 -0000 1.2 --- AbstractSwordInstaller.java 24 Jan 2005 23:28:01 -0000 1.3 *************** *** 168,172 **** NetUtil.makeDirectory(desturl); ! URL temp = NetUtil.getTemporaryURL("swd", "zip"); //$NON-NLS-1$ //$NON-NLS-2$ download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp); --- 168,172 ---- NetUtil.makeDirectory(desturl); ! URL temp = NetUtil.getTemporaryURL("swd", ZIP_SUFFIX); //$NON-NLS-1$ download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp); From jswordcvs at crosswire.org Mon Jan 24 16:28:29 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:28:30 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install/sword s Message-ID: <200501242328.j0ONSTvm022601@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword In directory www.crosswire.org:/tmp/cvs-serv22592/java/jsword/org/crosswire/jsword/book/install/sword Modified Files: HttpSwordInstaller.java Log Message: Fixed a bug where arguments to copy were reversed. Index: HttpSwordInstaller.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/HttpSwordInstaller.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HttpSwordInstaller.java 28 Nov 2004 21:36:46 -0000 1.13 --- HttpSwordInstaller.java 24 Jan 2005 23:28:27 -0000 1.14 *************** *** 81,85 **** { URL url = new URL("http://" + host + dir + '/' + file); //$NON-NLS-1$ ! copy(job, dest, url); } catch (IOException ex) --- 81,85 ---- { URL url = new URL("http://" + host + dir + '/' + file); //$NON-NLS-1$ ! copy(job, url, dest); } catch (IOException ex) From jswordcvs at crosswire.org Mon Jan 24 16:29:47 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:29:49 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/passage s Message-ID: <200501242329.j0ONTlOa022650@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage In directory www.crosswire.org:/tmp/cvs-serv22644/java/jsword/org/crosswire/jsword/passage Modified Files: ReadOnlyPassage.java AccuracyType.java RestrictionType.java PassageTally.java Log Message: Added or changed serialVersionUID to real value Index: ReadOnlyPassage.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/ReadOnlyPassage.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ReadOnlyPassage.java 25 Aug 2004 22:54:37 -0000 1.17 --- ReadOnlyPassage.java 24 Jan 2005 23:29:45 -0000 1.18 *************** *** 400,405 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } --- 400,405 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3257853173036102193L; } Index: AccuracyType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/AccuracyType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AccuracyType.java 28 Nov 2004 21:36:46 -0000 1.6 --- AccuracyType.java 24 Jan 2005 23:29:45 -0000 1.7 *************** *** 106,109 **** --- 106,114 ---- return createStartVerse(endVerseDesc, null, endParts); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3256719589483165495L; }; *************** *** 142,145 **** --- 147,155 ---- return end.getLastVerseInChapter(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3258125864737911609L; }; *************** *** 178,181 **** --- 188,196 ---- return end.getLastVerseInBook(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 4050486707419821620L; }; *************** *** 216,219 **** --- 231,239 ---- return new Verse(endVerseDesc, book, chapter, verse); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3691040958808668471L; }; *************** *** 253,256 **** --- 273,281 ---- return end.getLastVerseInChapter(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3689918357520463409L; }; *************** *** 291,294 **** --- 316,324 ---- return new Verse(endVerseDesc, book, chapter, verse); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3691034361722320178L; }; Index: RestrictionType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/RestrictionType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RestrictionType.java 8 Sep 2004 19:55:08 -0000 1.3 --- RestrictionType.java 24 Jan 2005 23:29:45 -0000 1.4 *************** *** 75,78 **** --- 75,83 ---- return new VerseRange(verse, end); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3905246714754643248L; }; *************** *** 113,116 **** --- 118,126 ---- throw new IllegalArgumentException(Msg.RANGE_BLURBOOK.toString()); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3978142166633820472L; }; *************** *** 202,205 **** --- 212,219 ---- } + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257284751327768626L; }; Index: PassageTally.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/PassageTally.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** PassageTally.java 8 Sep 2004 19:55:08 -0000 1.30 --- PassageTally.java 24 Jan 2005 23:29:45 -0000 1.31 *************** *** 816,822 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; /** --- 816,822 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3761128240928274229L; /** From jswordcvs at crosswire.org Mon Jan 24 16:29:47 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 16:29:50 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/sword s Message-ID: <200501242329.j0ONTlnl022657@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword In directory www.crosswire.org:/tmp/cvs-serv22644/java/jsword/org/crosswire/jsword/book/sword Modified Files: CompressionType.java ConfigEntry.java ModuleType.java BlockType.java Log Message: Added or changed serialVersionUID to real value Index: ConfigEntry.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ConfigEntry.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConfigEntry.java 21 Sep 2004 17:46:23 -0000 1.7 --- ConfigEntry.java 24 Jan 2005 23:29:45 -0000 1.8 *************** *** 440,446 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; // Support for serialization --- 440,446 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3258125873411273014L; // Support for serialization Index: ModuleType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ModuleType.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ModuleType.java 5 Oct 2004 22:03:09 -0000 1.10 --- ModuleType.java 24 Jan 2005 23:29:45 -0000 1.11 *************** *** 49,52 **** --- 49,57 ---- return new RawBackend(path); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257004341402874419L; }; *************** *** 70,73 **** --- 75,83 ---- return isCompressedBackendSupported(sbmd); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3258697597915772985L; }; *************** *** 86,89 **** --- 96,104 ---- return new RawBackend(path); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3762250850940433716L; }; *************** *** 107,110 **** --- 122,130 ---- return isCompressedBackendSupported(sbmd); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257008752367580211L; }; *************** *** 123,126 **** --- 143,151 ---- return new RawBackend(path); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257567291372548153L; }; *************** *** 139,142 **** --- 164,172 ---- return new RawBackend(path); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257005475290625843L; }; *************** *** 155,158 **** --- 185,193 ---- return new RawLDBackend(sbmd, path, 2); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3258412833061352242L; }; *************** *** 171,174 **** --- 206,214 ---- return new RawLDBackend(sbmd, path, 4); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3258689892711149625L; }; *************** *** 187,190 **** --- 227,235 ---- return new ZLDBackend(sbmd); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257849883074573619L; }; *************** *** 203,206 **** --- 248,256 ---- return new RawBackend(path); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257849895976449588L; }; Index: CompressionType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/CompressionType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CompressionType.java 5 Oct 2004 22:03:09 -0000 1.3 --- CompressionType.java 24 Jan 2005 23:29:45 -0000 1.4 *************** *** 46,49 **** --- 46,54 ---- return new GZIPBackend(path, blockType); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3977014063492642096L; }; *************** *** 61,64 **** --- 66,74 ---- return new LZSSBackend(sbmd); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257847692691517494L; }; Index: BlockType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/BlockType.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlockType.java 8 Sep 2004 19:55:07 -0000 1.2 --- BlockType.java 24 Jan 2005 23:29:45 -0000 1.3 *************** *** 39,42 **** --- 39,47 ---- return 'b'; } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257569486067807287L; }; *************** *** 50,53 **** --- 55,63 ---- return 'c'; } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3762533416838968372L; }; *************** *** 61,64 **** --- 71,79 ---- return 'v'; } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257572793192362551L; }; From jswordcvs at crosswire.org Mon Jan 24 17:02:25 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:26 2005 Subject: [jsword-svn] common/java/core/org/crosswire/common/util s Message-ID: <200501250002.j0P02PZK022922@www.crosswire.org> Update of /cvs/jsword/common/java/core/org/crosswire/common/util In directory www.crosswire.org:/tmp/cvs-serv22918/java/core/org/crosswire/common/util Added Files: SortedListSet.java Filter.java Log Message: Added language to the book installer tree. --- NEW FILE: SortedListSet.java --- package org.crosswire.common.util; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Set; /** * Maintains a sorted list of unique objects. It is expected * that the objects implement Comparable. Methods that take an index * to indicate an insertion point are ignored. * *

*
* * Distribution Licence:
* JSword is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License, * version 2 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 * General Public License for more details.
* The License is available on the internet * here, or by writing to: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA
* The copyright to this program is held by it's authors. *
* @see gnu.gpl.Licence * @author DM Smith [dmsmith555 at yahoo dot com] * @version $Id: SortedListSet.java,v 1.1 2005/01/25 00:02:22 dmsmith Exp $ */ public class SortedListSet extends ArrayList implements Set { /** * Create an empty SortedListSet of default size. */ public SortedListSet() { super(); } /** * Create an empty SortedListSet of the stated capacity * @param initialCapacity */ public SortedListSet(int initialCapacity) { super(initialCapacity); } /** * @param c */ public SortedListSet(Collection c) { this(c.size()); // Might be better to add all then sort. addAll(c); } /* (non-Javadoc) * @see java.util.List#add(int, java.lang.Object) */ public void add(int index, Object element) { // ignore the requested index add(element); } /* (non-Javadoc) * @see java.util.Collection#add(java.lang.Object) */ public boolean add(Object o) { // Add the item only if it is not in the list. // Add it into the list so that it is in sorted order. int pos = Collections.binarySearch(this, o); if (pos < 0) { super.add(-pos-1, o); return true; } return false; } /* (non-Javadoc) * @see java.util.Collection#addAll(java.util.Collection) */ public boolean addAll(Collection c) { // Might be better to add the list to the end // and then sort the list. // This can be revisited if the list performs badly. boolean added = false; Iterator bmdIter = c.iterator(); while (bmdIter.hasNext()) { if (add(bmdIter.next())) { added = true; } } return added; } /* (non-Javadoc) * @see java.util.List#addAll(int, java.util.Collection) */ public boolean addAll(int index, Collection c) { // Ignore the index return addAll(c); } /* (non-Javadoc) * @see java.util.List#set(int, java.lang.Object) */ public Object set(int index, Object element) { // remove the item at the index (keep it to return it), // then insert the item into the sorted list. Object item = remove(index); add(element); return item; } /** * Get a filtered list set. * @param filter The criteria by which to filter. * @return a filtered SortedListSet. */ public SortedListSet filter(Filter filter) { // create a copy of the list and // remove everything that fails the test. SortedListSet listSet = (SortedListSet) clone(); Iterator iter = listSet.iterator(); while (iter.hasNext()) { Object obj = iter.next(); if (!filter.test(obj)) { iter.remove(); } } return listSet; } /** * Serialization ID */ private static final long serialVersionUID = 3258413945407484212L; } --- NEW FILE: Filter.java --- package org.crosswire.common.util; /** * A method of filtering Objects. * *

*
* * Distribution Licence:
* JSword is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License, * version 2 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 * General Public License for more details.
* The License is available on the internet * here, or by writing to: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA
* The copyright to this program is held by it's authors. *
* @see gnu.gpl.Licence * @author DM Smith [dmsmith555 at yahoo dot com] * @version $Id: Filter.java,v 1.1 2005/01/25 00:02:22 dmsmith Exp $ */ public interface Filter { /** * Does this given object pass the test implemented by this filter * @param obj The object to test * @return boolean true if it passes, false otherwise */ public boolean test(Object obj); } From jswordcvs at crosswire.org Mon Jan 24 17:02:28 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:30 2005 Subject: [jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/book s Message-ID: <200501250002.j0P02SIS022954@www.crosswire.org> Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book In directory www.crosswire.org:/tmp/cvs-serv22945/java/main/org/crosswire/bibledesktop/book Modified Files: SitePane.java Added Files: BookNode.java Log Message: Added language to the book installer tree. --- NEW FILE: BookNode.java --- package org.crosswire.bibledesktop.book; import java.util.Iterator; import java.util.Set; import javax.swing.tree.DefaultMutableTreeNode; import org.crosswire.jsword.book.BookMetaDataSet; /** * A Node for a book in a tree. It may be a property of a BookMetaData * or the BookMetaData itself. * *

*
* * Distribution Licence:
* JSword is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License, * version 2 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 * General Public License for more details.
* The License is available on the internet * here, or by writing to: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA
* The copyright to this program is held by it's authors. *
* @see gnu.gpl.Licence * @author DM Smith [dmsmith555 at yahoo dot com] * @version $Id: BookNode.java,v 1.1 2005/01/25 00:02:26 dmsmith Exp $ */ public class BookNode extends DefaultMutableTreeNode { public BookNode(Object node, BookMetaDataSet books, Object [] grouping, int level) { setUserObject(node); if (level < grouping.length) { String key = (String) grouping[level]; Set group = books.getGroup(key); Iterator iter = group.iterator(); while (iter.hasNext()) { String value = iter.next().toString(); BookMetaDataSet subBooks = books.filter(key, value); add(new BookNode(value, subBooks, grouping, level + 1)); } } else if (books != null) { Iterator iter = books.iterator(); while (iter.hasNext()) { add(new BookNode(iter.next(), null, grouping, level + 1)); } } } /** * Serialization ID */ private static final long serialVersionUID = 3256442525387602231L; } Index: SitePane.java =================================================================== RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/SitePane.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SitePane.java 28 Nov 2004 21:36:04 -0000 1.14 --- SitePane.java 25 Jan 2005 00:02:26 -0000 1.15 *************** *** 15,18 **** --- 15,22 ---- import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; + import javax.swing.tree.DefaultMutableTreeNode; + import javax.swing.tree.DefaultTreeModel; + import javax.swing.tree.TreeModel; + import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; *************** *** 26,30 **** --- 30,37 ---- import org.crosswire.jsword.book.BookList; import org.crosswire.jsword.book.BookMetaData; + import org.crosswire.jsword.book.BookMetaDataSet; import org.crosswire.jsword.book.Books; + import org.crosswire.jsword.book.BooksEvent; + import org.crosswire.jsword.book.BooksListener; import org.crosswire.jsword.book.install.InstallException; import org.crosswire.jsword.book.install.Installer; *************** *** 87,90 **** --- 94,98 ---- { bl = Books.installed(); + bl.addBooksListener(new CustomBooksListener()); } *************** *** 114,121 **** private void updateDescription() { if (installer == null) { int bookCount = Books.installed().getBookMetaDatas().size(); ! lblDesc.setText(Msg.INSTALLED_DESC.toString(new Object[] { new Integer(bookCount) })); } else --- 122,131 ---- private void updateDescription() { + String desc = "#ERROR#"; //$NON-NLS-1$ + if (installer == null) { int bookCount = Books.installed().getBookMetaDatas().size(); ! desc = Msg.INSTALLED_DESC.toString(new Object[] { new Integer(bookCount) }); } else *************** *** 124,134 **** if (bookCount == 0) { ! lblDesc.setText(Msg.NONE_AVAILABLE_DESC.toString()); } else { ! lblDesc.setText(Msg.AVAILABLE_DESC.toString(new Object[] { new Integer(bookCount) })); } } } --- 134,146 ---- if (bookCount == 0) { ! desc = Msg.NONE_AVAILABLE_DESC.toString(); } else { ! desc = Msg.AVAILABLE_DESC.toString(new Object[] { new Integer(bookCount) }); } } + + lblDesc.setText(desc); } *************** *** 193,197 **** { treAvailable = new JTree(); ! treAvailable.setModel(new BooksTreeModel(books)); treAvailable.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); treAvailable.setCellEditor(null); --- 205,211 ---- { treAvailable = new JTree(); ! setTreeModel(books); ! // Add lines if viewed in Java Look & Feel ! treAvailable.putClientProperty("JTree.lineStyle", "Angled"); //$NON-NLS-1$ //$NON-NLS-2$ treAvailable.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); treAvailable.setCellEditor(null); *************** *** 212,215 **** --- 226,253 ---- } + private TreeModel createTreeModel(BookList books) + { + // return new BooksTreeModel(books); + BookMetaDataSet bmds = new BookMetaDataSet(books.getBookMetaDatas()); + TreeNode bookRoot = new BookNode("root", bmds, new Object[] { BookMetaData.KEY_TYPE, BookMetaData.KEY_LANGUAGE }, 0); //$NON-NLS-1$ + return new DefaultTreeModel(bookRoot); + } + + // provide for backward compatibility + private BookMetaData getBookMetaData(Object obj) + { + // new way + if (obj instanceof DefaultMutableTreeNode) + { + obj = ((DefaultMutableTreeNode)obj).getUserObject(); + } + // Old way + if (obj instanceof BookMetaData) + { + return (BookMetaData) obj; + } + return null; + } + /** * *************** *** 248,253 **** { installer.reloadBookList(); ! ! treAvailable.setModel(new BooksTreeModel(installer)); } catch (InstallException ex) --- 286,290 ---- { installer.reloadBookList(); ! setTreeModel(installer); } catch (InstallException ex) *************** *** 269,273 **** { Object last = path.getLastPathComponent(); ! BookMetaData name = (BookMetaData) last; try --- 306,310 ---- { Object last = path.getLastPathComponent(); ! BookMetaData name = getBookMetaData(last); try *************** *** 309,313 **** try { ! BookMetaData bmd = (BookMetaData) path.getLastPathComponent(); IndexDownloader.downloadIndex(bmd, installer); } --- 346,351 ---- try { ! Object last = path.getLastPathComponent(); ! BookMetaData bmd = getBookMetaData(last); IndexDownloader.downloadIndex(bmd, installer); } *************** *** 331,338 **** { Object last = path.getLastPathComponent(); ! ! if (last instanceof BookMetaData) { ! mtm = new BookMetaDataTableModel((BookMetaData) last); bookSelected = true; } --- 369,376 ---- { Object last = path.getLastPathComponent(); ! BookMetaData bmd = getBookMetaData(last); ! if (bmd != null) { ! mtm = new BookMetaDataTableModel(bmd); bookSelected = true; } *************** *** 345,348 **** --- 383,414 ---- } + public void setTreeModel(BookList books) + { + treAvailable.setModel(createTreeModel(books)); + } + + /** + * When new books are added we need to relfect the change in this tree. + */ + private final class CustomBooksListener implements BooksListener + { + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BooksListener#bookAdded(org.crosswire.jsword.book.BooksEvent) + */ + public void bookAdded(BooksEvent ev) + { + setTreeModel((BookList) ev.getSource()); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BooksListener#bookRemoved(org.crosswire.jsword.book.BooksEvent) + */ + public void bookRemoved(BooksEvent ev) + { + setTreeModel((BookList) ev.getSource()); + } + } + + private static final String INSTALLED_BOOKS_LABEL = "InstalledBooksLabel"; //$NON-NLS-1$ private static final String AVAILABLE_BOOKS_LABEL = "AvailableBooksLabel"; //$NON-NLS-1$ *************** *** 372,377 **** /** ! * SERIALUID(dms): A placeholder for the ultimate version id. */ ! private static final long serialVersionUID = 1L; } \ No newline at end of file --- 438,443 ---- /** ! * Serialization ID */ ! private static final long serialVersionUID = 3616445692051075634L; } \ No newline at end of file From jswordcvs at crosswire.org Mon Jan 24 17:02:34 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:35 2005 Subject: [jsword-svn] jsword/java/limbo/org/crosswire/jsword/book/remote s Message-ID: <200501250002.j0P02Y28022995@www.crosswire.org> Update of /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote In directory www.crosswire.org:/tmp/cvs-serv22965/java/limbo/org/crosswire/jsword/book/remote Modified Files: RemoteBook.java Log Message: Added language to the book installer tree. Index: RemoteBook.java =================================================================== RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote/RemoteBook.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RemoteBook.java 28 Nov 2004 21:34:44 -0000 1.9 --- RemoteBook.java 25 Jan 2005 00:02:32 -0000 1.10 *************** *** 78,82 **** SAXEventProvider provider = new JDOMSAXEventProvider(doc); ! return new BookData(provider, this, key); } catch (RemoterException ex) --- 78,82 ---- SAXEventProvider provider = new JDOMSAXEventProvider(doc); ! return new BookData(provider); } catch (RemoterException ex) From jswordcvs at crosswire.org Mon Jan 24 17:02:34 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:35 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s Message-ID: <200501250002.j0P02Y6A022987@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book In directory www.crosswire.org:/tmp/cvs-serv22965/java/jsword/org/crosswire/jsword/book Modified Files: Msg.java Msg.properties StudyTool.java Books.java BookFilterIterator.java Added Files: BookMetaDataSet.java Log Message: Added language to the book installer tree. Index: Msg.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Msg.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Msg.java 16 Aug 2004 22:08:43 -0000 1.17 --- Msg.java 25 Jan 2005 00:02:32 -0000 1.18 *************** *** 48,51 **** --- 48,53 ---- static final Msg OPEN_COMMERCIAL = new Msg("Openness.Commercial"); //$NON-NLS-1$ + static final Msg BOOK_METADATA_SET_OTHER = new Msg("BookMetaDataSet.Other"); //$NON-NLS-1$ + static final Msg STRONGS_GREEK = new Msg("Strongs.Greek"); //$NON-NLS-1$ static final Msg STRONGS_HEBREW = new Msg("Strongs.Hebrew"); //$NON-NLS-1$ --- NEW FILE: BookMetaDataSet.java --- package org.crosswire.jsword.book; import java.util.Collection; import java.util.Iterator; import java.util.Set; import java.util.TreeSet; import org.crosswire.common.util.Filter; import org.crosswire.common.util.SortedListSet; /** * BookMetaDataSet represents a collection of descriptions about Books * which may be subsetted into other BookMetaDataSets. * Each set is naturally ordered. * *

*
* * Distribution Licence:
* JSword is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public License, * version 2 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 * General Public License for more details.
* The License is available on the internet * here, or by writing to: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA
* The copyright to this program is held by it's authors. *
* @see gnu.gpl.Licence * @author DM Smith [dmsmith555 at yahoo dot com] * @version $Id: BookMetaDataSet.java,v 1.1 2005/01/25 00:02:32 dmsmith Exp $ */ public class BookMetaDataSet extends SortedListSet { public BookMetaDataSet() { super(); } public BookMetaDataSet(Collection bmds) { super(bmds); } /** * Gets the sorted set of all keys which can be used for groupings. * These are all the property keys across the BookMetaDatas in this list. * @return the set of all keys which can be used for grouping. */ public Set getGroups() { Set results = new TreeSet(); Iterator bmdIter = iterator(); while (bmdIter.hasNext()) { BookMetaData bmd = (BookMetaData) bmdIter.next(); results.addAll(bmd.getProperties().keySet()); } return results; } /** * Get the sorted set of all values for a particular key. * If there is a BookMetaData that does not have a value * for that key, then null will be in the set. This can be use * to categorize books that don't have that key. * For example, "Language" will return all the languages * for this BookMetaDataList and null for which the language * is unknown. * @param key * @return the values for a particular key. */ public Set getGroup(String key) { Set results = new TreeSet(); Iterator bmdIter = iterator(); while (bmdIter.hasNext()) { BookMetaData bmd = (BookMetaData) bmdIter.next(); Object property = bmd.getProperties().get(key); String propertyValue = property == null ? Msg.BOOK_METADATA_SET_OTHER.toString() : property.toString(); results.add(propertyValue); } return results; } public BookMetaDataSet filter(String key, String value) { return (BookMetaDataSet) filter(new GroupFilter(key, value)); } private static final class GroupFilter implements Filter { public GroupFilter(String aKey, String aValue) { key = aKey; value = aValue; } public boolean test(Object obj) { BookMetaData bmd = (BookMetaData) obj; return bmd.getProperties().get(key) == value; } private String key; private String value; } /** * Serialization ID */ private static final long serialVersionUID = 3258688806185154867L; } Index: StudyTool.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/StudyTool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** StudyTool.java 9 Oct 2004 21:45:05 -0000 1.9 --- StudyTool.java 25 Jan 2005 00:02:32 -0000 1.10 *************** *** 72,80 **** if (trans == null) { ! trans = new Translation(word, strongs); reply.put(strongs, trans); } ! trans.getRef().add(OSISUtil.getVerse(w)); } } --- 72,80 ---- if (trans == null) { ! trans = new Translation(word, strongs, key); reply.put(strongs, trans); } ! trans.getKey().addAll(OSISUtil.getVerse(w)); } } *************** *** 121,129 **** if (trans == null) { ! trans = new Translation(translated, number); reply.put(translated, trans); } ! trans.getRef().add(OSISUtil.getVerse(w)); } } --- 121,129 ---- if (trans == null) { ! trans = new Translation(translated, number, key); reply.put(translated, trans); } ! trans.getKey().addAll(OSISUtil.getVerse(w)); } } Index: Books.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Books.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Books.java 28 Nov 2004 21:36:46 -0000 1.37 --- Books.java 25 Jan 2005 00:02:32 -0000 1.38 *************** *** 193,197 **** books.add(bmd); ! fireBooksChanged(Books.class, bmd, true); } --- 193,197 ---- books.add(bmd); ! fireBooksChanged(instance, bmd, true); } *************** *** 210,214 **** if (removed) { ! fireBooksChanged(Books.class, bmd, true); } else --- 210,214 ---- if (removed) { ! fireBooksChanged(instance, bmd, true); } else *************** *** 412,416 **** * So it just acts as a means of commenting out code. */ ! private boolean threaded = false; /** --- 412,416 ---- * So it just acts as a means of commenting out code. */ ! private boolean threaded; /** Index: Msg.properties =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Msg.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Msg.properties 27 Jun 2004 22:09:14 -0000 1.2 --- Msg.properties 25 Jan 2005 00:02:32 -0000 1.3 *************** *** 25,28 **** --- 25,30 ---- Openness.Commercial=Commercial + BookMetaDataSet.Other=Other + Strongs.Greek=Greek: Strongs.Hebrew=Hebrew: Index: BookFilterIterator.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookFilterIterator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BookFilterIterator.java 8 Sep 2004 19:55:07 -0000 1.5 --- BookFilterIterator.java 25 Jan 2005 00:02:32 -0000 1.6 *************** *** 1,3 **** - package org.crosswire.jsword.book; --- 1,2 ---- *************** *** 27,30 **** --- 26,30 ---- * @see gnu.gpl.Licence * @author Joe Walker [joe at eireneh dot com] + * @author DM Smith [dmsmith555 at yahoo dot com] * @version $Id$ */ *************** *** 39,58 **** this.it = it; this.filter = filter; - - findNext(); } ! /** ! * Are there any more? * @see java.util.Iterator#hasNext() */ public boolean hasNext() { return next != null; } ! /** ! * Get the next. Hmmm using finally to avoid creating a temporary local ! * variable. Just how evil is this? * @see java.util.Iterator#next() */ --- 39,54 ---- this.it = it; this.filter = filter; } ! /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ public boolean hasNext() { + next = findNext(); return next != null; } ! /* (non-Javadoc) * @see java.util.Iterator#next() */ *************** *** 63,79 **** throw new NoSuchElementException(); } ! ! try ! { ! return next; ! } ! finally ! { ! findNext(); ! } } ! /** ! * Can't do this. * @see java.util.Iterator#remove() */ --- 59,66 ---- throw new NoSuchElementException(); } ! return next; } ! /* (non-Javadoc) * @see java.util.Iterator#remove() */ *************** *** 84,108 **** /** ! * Store the next (if there is one) */ ! private void findNext() { ! if (filter == null) ! { ! next = null; ! return; ! } ! ! do { ! if (!it.hasNext()) { ! next = null; ! return; } - - next = (BookMetaData) it.next(); } ! while (!filter.test(next)); } --- 71,88 ---- /** ! * Find the next (if there is one) */ ! private BookMetaData findNext() { ! while (it.hasNext()) { ! BookMetaData bmd = (BookMetaData) it.next(); ! if (filter == null || filter.test(bmd)) { ! return bmd; } } ! ! return null; } From jswordcvs at crosswire.org Mon Jan 24 17:02:34 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:36 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/sword s Message-ID: <200501250002.j0P02YB6023000@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword In directory www.crosswire.org:/tmp/cvs-serv22965/java/jsword/org/crosswire/jsword/book/sword Modified Files: SwordBookMetaData.java Removed Files: iso639.properties Log Message: Added language to the book installer tree. --- iso639.properties DELETED --- Index: SwordBookMetaData.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/SwordBookMetaData.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** SwordBookMetaData.java 16 Oct 2004 09:07:43 -0000 1.34 --- SwordBookMetaData.java 25 Jan 2005 00:02:32 -0000 1.35 *************** *** 16,34 **** import java.util.Locale; import java.util.Map; - import java.util.MissingResourceException; - import java.util.ResourceBundle; import java.util.Set; import java.util.TreeMap; - import org.crosswire.common.util.CWClassLoader; import org.crosswire.common.util.Histogram; import org.crosswire.common.util.Logger; import org.crosswire.common.util.NetUtil; import org.crosswire.common.util.StringUtil; - import org.crosswire.jsword.book.Book; - import org.crosswire.jsword.book.BookDriver; - import org.crosswire.jsword.book.BookMetaData; import org.crosswire.jsword.book.BookType; - import org.crosswire.jsword.book.IndexStatus; import org.crosswire.jsword.book.basic.AbstractBookMetaData; import org.crosswire.jsword.book.filter.Filter; --- 16,27 ---- *************** *** 90,94 **** public SwordBookMetaData(Reader in, String internal) throws IOException { ! this.book = null; this.internal = internal; this.supported = true; --- 83,87 ---- public SwordBookMetaData(Reader in, String internal) throws IOException { ! setBook(null); this.internal = internal; this.supported = true; *************** *** 149,157 **** } ! prop.put(key, combined.toString()); } // set the key property file entries ! prop.put(KEY_INITIALS, initials); validate(); --- 142,150 ---- } ! putProperty(key, combined.toString()); } // set the key property file entries ! putProperty(KEY_INITIALS, initials); validate(); *************** *** 180,184 **** String lang = getProperty(ConfigEntry.LANG); ! prop.put(KEY_LANGUAGE, getLanguage(lang)); if (lang != null) //$NON-NLS-1$ { --- 173,177 ---- String lang = getProperty(ConfigEntry.LANG); ! putProperty(KEY_LANGUAGE, getLanguage(internal, lang)); if (lang != null) //$NON-NLS-1$ { *************** *** 205,209 **** { BookType type = mtype.getBookType(); ! prop.put(KEY_TYPE, type != null ? type.toString() : ""); //$NON-NLS-1$ } --- 198,202 ---- { BookType type = mtype.getBookType(); ! putProperty(KEY_TYPE, type != null ? type.toString() : ""); //$NON-NLS-1$ } *************** *** 213,256 **** /** - * Get the language name from the language code. Note, this code does not support dialects. - * @param iso639Code - * @return the name of the language - */ - private String getLanguage(String iso639Code) - { - String lookup = iso639Code; - if (lookup == null || lookup.length() == 0) - { - log.warn("Book " + internal + " named " + getName() + " has no language specified. Assuming English."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - return getLanguage(DEFAULT_LANG_CODE); - } - - if (lookup.indexOf('_') != -1) - { - String[] locale = StringUtil.split(lookup, '_'); - return getLanguage(locale[0]); - } - - char firstLangChar = lookup.charAt(0); - // If the language begins w/ an x then it is "Undetermined" - // Also if it is not a 2 or 3 character code then it is not a valid - // iso639 code. - if (firstLangChar == 'x' || firstLangChar == 'X' || lookup.length() > 3) - { - return getLanguage(UNKNOWN_LANG_CODE); - } - - try - { - return languages.getString(lookup); - } - catch (MissingResourceException e) - { - log.error("Not a valid language code:" + iso639Code + " in book " + internal); //$NON-NLS-1$ //$NON-NLS-2$ - return getLanguage(UNKNOWN_LANG_CODE); - } - } - - /** * Save this config file to a URL * @param dest The URL to save the data to --- 206,209 ---- *************** *** 322,327 **** organize(orderedMap, COPYRIGHT_INFO); // add everything else in sorted order ! orderedMap.putAll(new TreeMap(prop)); ! prop = orderedMap; } --- 275,280 ---- organize(orderedMap, COPYRIGHT_INFO); // add everything else in sorted order ! orderedMap.putAll(new TreeMap(getProperties())); ! setProperties(orderedMap); } *************** *** 334,338 **** { String key = category[i].toString(); ! Object value = prop.remove(key); if (value != null) { --- 287,291 ---- { String key = category[i].toString(); ! Object value = getProperties().remove(key); if (value != null) { *************** *** 685,689 **** table.put(key, list); ! prop.put(key, value); } --- 638,642 ---- table.put(key, list); ! putProperty(key, value); } *************** *** 707,734 **** /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getBook() - */ - public Book getBook() - { - return book; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getDriver() - */ - public BookDriver getDriver() - { - return driver; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getLanguage() - */ - public String getLanguage() - { - return getProperty(KEY_LANGUAGE); - } - - /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#getInitials() */ --- 660,663 ---- *************** *** 738,768 **** } - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getProperties() - */ - public Map getProperties() - { - return prop; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getIndexStatus() - */ - public IndexStatus getIndexStatus() - { - return indexStatus; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#setIndexStatus(java.lang.String) - */ - public void setIndexStatus(IndexStatus newValue) - { - IndexStatus oldValue = this.indexStatus; - this.indexStatus = newValue; - prop.put(KEY_INDEXSTATUS, newValue); - firePropertyChange(KEY_INDEXSTATUS, oldValue, newValue); - } - /** * Get the string value for the property or null if it is not defined. --- 667,670 ---- *************** *** 773,777 **** public String getProperty(Object entry) { ! String result = (String) prop.get(entry.toString()); if (result == null) --- 675,679 ---- public String getProperty(Object entry) { ! String result = (String) getProperty(entry.toString()); if (result == null) *************** *** 791,795 **** else { ! prop.put(entry.toString(), result); } } --- 693,697 ---- else { ! putProperty(entry.toString(), result); } } *************** *** 798,849 **** /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getFullName() - */ - public String getFullName() - { - if (fullName == null) - { - fullName = computeFullName(); - } - return fullName; - } - - /** - * - */ - private String computeFullName() - { - StringBuffer buf = new StringBuffer(getName()); - - if (driver != null) - { - buf.append(" (").append(getDriverName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - return buf.toString(); - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getFullName() - */ - public String getOsisID() - { - return getType().toString() + '.' + getInitials(); - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getDriverName() - */ - public String getDriverName() - { - if (driver == null) - { - return null; - } - - return driver.getDriverName(); - } - - /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#lsLeftToRight() */ --- 700,703 ---- *************** *** 854,935 **** } - /** - * @param book The book to set. - */ - protected void setBook(Book book) - { - this.book = book; - } - - /** - * This setter is public because access is needed from *SwordInstallers as - * well as the normal sword drivers. Where is C++ friend when you need it! - * @param driver The driver to set. - */ - public void setDriver(BookDriver driver) - { - this.driver = driver; - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object obj) - { - // Since this can not be null - if (obj == null) - { - return false; - } - - // We might consider checking for equality against all BookMetaDatas? - // However currently we dont. - - // Check that that is the same as this - // Don't use instanceof since that breaks inheritance - if (!obj.getClass().equals(this.getClass())) - { - return false; - } - - // The real bit ... - BookMetaData that = (BookMetaData) obj; - - return getName().equals(that.getName()); - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - public int hashCode() - { - return getName().hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() - { - if (displayName == null) - { - StringBuffer buf = new StringBuffer("["); //$NON-NLS-1$ - buf.append(getInitials()); - buf.append("] - "); //$NON-NLS-1$ - buf.append(getFullName()); - displayName = buf.toString(); - } - return displayName; - } - - /* (non-Javadoc) - * @see java.lang.Comparable#compareTo(java.lang.Object) - */ - public int compareTo(Object obj) - { - BookMetaData that = (BookMetaData) obj; - return this.getName().compareTo(that.getName()); - } - public static void dumpStatistics() { --- 708,711 ---- *************** *** 937,943 **** } - private static final String DEFAULT_LANG_CODE = "en"; //$NON-NLS-1$ - private static final String UNKNOWN_LANG_CODE = "und"; //$NON-NLS-1$ - /** * The log stream --- 713,716 ---- *************** *** 945,961 **** private static final Logger log = Logger.getLogger(SwordBookMetaData.class); - private static/*final*/ResourceBundle languages; - static - { - try - { - languages = ResourceBundle.getBundle("iso639", Locale.getDefault(), new CWClassLoader()); //$NON-NLS-1$; - } - catch (MissingResourceException e) - { - assert false; - } - } - private static final Object[] BASIC_INFO = { --- 718,721 ---- *************** *** 1074,1082 **** /** - * The single key version of the input file - */ - private Map prop = new LinkedHashMap(); - - /** * The original name of this config file from mods.d. * This is only used for reporting --- 834,837 ---- *************** *** 1085,1092 **** private ModuleType mtype; - private Book book; - private BookDriver driver; - private String fullName; - private String displayName; private String initials = ""; //$NON-NLS-1$ private boolean supported; --- 840,843 ---- *************** *** 1095,1098 **** private static Histogram histogram = new Histogram(); private List warnings = new ArrayList(); - private IndexStatus indexStatus = IndexStatus.UNDONE; } --- 846,848 ---- From jswordcvs at crosswire.org Mon Jan 24 17:02:34 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Mon Jan 24 17:02:37 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/basic s Message-ID: <200501250002.j0P02YGd023013@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/basic In directory www.crosswire.org:/tmp/cvs-serv22965/java/jsword/org/crosswire/jsword/book/basic Modified Files: DefaultBookMetaData.java AbstractBookMetaData.java Added Files: iso639.properties Log Message: Added language to the book installer tree. --- NEW FILE: iso639.properties --- # The following are iso639-2 and iso639-3 codes and their languages. # These are derived from authoritative tables, but there were differences. # I have also include some old codes (e.g. iw for hebrew) # I have tried to account for the differences, but there may be mistakes. ab=Abkhazian abk=Abkhazian ace=Achinese ach=Acoli ada=Adangme aa=Afar aar=Afar afh=Afrihili af=Afrikaans afr=Afrikaans afa=Afro-Asiatic (Other) aka=Akan akk=Akkadian alb=Albanian sq=Albanian sqi=Albanian ale=Aleut alg=Algonquian languages tut=Altaic (Other) am=Amharic amh=Amharic apa=Apache languages ar=Arabic ara=Arabic arc=Aramaic arp=Arapaho arn=Araucanian arw=Arawak arm=Armenian hy=Armenian hye=Armenian art=Artificial (Other) as=Assamese asm=Assamese ath=Athapascan languages map=Austronesian (Other) ava=Avaric ave=Avestan awa=Awadhi ay=Aymara aym=Aymara az=Azerbaijani aze=Azerbaijani nah=Aztec ban=Balinese bat=Baltic (Other) bal=Baluchi bam=Bambara bai=Bamileke languages bad=Banda bnt=Bantu (Other) bas=Basa ba=Bashkir bak=Bashkir baq=Basque eu=Basque eus=Basque bej=Beja bem=Bemba ben=Bengali; Bangla bn=Bengali; Bangla ber=Berber (Other) bho=Bhojpuri bh=Bihari bih=Bihari bik=Bikol bin=Bini bi=Bislama bis=Bislama bra=Braj br=Breton bre=Breton bug=Buginese bg=Bulgarian bul=Bulgarian bua=Buriat bur=Burmese my=Burmese mya=Burmese be=Byelorussian bel=Byelorussian cad=Caddo car=Carib ca=Catalan cat=Catalan cau=Caucasian (Other) ceb=Cebuano cel=Celtic (Other) cai=Central American Indian (Other) chg=Chagatai cha=Chamorro che=Chechen chr=Cherokee chy=Cheyenne chb=Chibcha chi=Chinese zh=Chinese zho=Chinese chn=Chinook jargon cho=Choctaw chu=Church Slavic chv=Chuvash cop=Coptic cor=Cornish co=Corsican cos=Corsican cre=Cree mus=Creek crp=Creoles and Pidgins (Other) cpe=Creoles and Pidgins, English-based (Other) cpf=Creoles and Pidgins, French-based (Other) cpp=Creoles and Pidgins, Portuguese-based (Other) hr=Croatian cus=Cushitic (Other) ces=Czech cs=Czech cze=Czech dak=Dakota da=Danish del=Delaware din=Dinka div=Divehi doi=Dogri dra=Dravidian (Other) dua=Duala dut=Dutch nl=Dutch nla=Dutch dum=Dutch, Middle (ca. 1050-1350) dyu=Dyula dz=Dzongkha/Bhutani dzo=Dzongkha/Bhutani efi=Efik egy=Egyptian (Ancient) eka=Ekajuk elx=Elamite en=English eng=English enm=English, Middle (ca. 1100-1500) ang=English, Old (ca. 450-1100) esk=Eskimo (Other) eo=Esperanto epo=Esperanto est=Estonian et=Estonian ewe=Ewe ewo=Ewondo fan=Fang fat=Fanti fao=Faroese fo=Faroese fij=Fijian fj=Fijian fi=Finnish fin=Finnish fiu=Finno-Ugrian (Other) fon=Fon fr=French fra=French fre=French frm=French, Middle (ca. 1400-1600) fro=French, Old (842- ca. 1400) fry=Frisian fy=Frisian ful=Fulah gaa=Ga gae=Gaelic (Scots) gd=Gaelic (Scots) gdh=Gaelic (Scots) gl=Galician/Gallegan glg=Galician/Gallegan lug=Ganda gay=Gayo gez=Geez geo=Georgian ka=Georgian kat=Georgian de=German deu=German ger=German gmh=German, Middle High (ca. 1050-1500) goh=German, Old High (ca. 750-1050) gem=Germanic (Other) gil=Gilbertese gon=Gondi got=Gothic grb=Grebo grc=Greek, Ancient (to 1453) el=Greek, Modern (1453-) ell=Greek, Modern (1453-) gre=Greek, Modern (1453-) kal=Greenlandic kl=Greenlandic gn=Guarani grn=Guarani gu=Gujarati guj=Gujarati hai=Haida ha=Hausa hau=Hausa haw=Hawaiian he=Hebrew heb=Hebrew iw=Hebrew her=Herero hil=Hiligaynon him=Himachali hi=Hindi hi=Hindi hin=Hindi hmo=Hiri Motu hu=Hungarian hun=Hungarian hup=Hupa iba=Iban ice=Icelandic is=Icelandic isl=Icelandic ibo=Igbo ijo=Ijo ilo=Iloko inc=Indic (Other) ine=Indo-European (Other) id=Indonesian in=Indonesian ind=Indonesian ia=Interlingua ina=Interlingua ie=Interlingue ine=Interlingue iku=Inuktitut iu=Inuktitut ik=Inupiak ipk=Inupiak ira=Iranian (Other) ga=Irish gai=Irish iri=Irish mga=Irish, Middle (900 - 1200) sga=Irish, Old (to 900) iro=Iroquoian languages it=Italian ita=Italian ja=Japanese jpn=Japanese jav=Javanese jaw=Javanese jv=Javanese jw=Javanese jrb=Judeo-Arabic jpr=Judeo-Persian kab=Kabyle kac=Kachin kam=Kamba kan=Kannada kn=Kannada kau=Kanuri kaa=Kara-Kalpak kar=Karen kas=Kashmiri ks=Kashmiri kaw=Kawi kaz=Kazakh kk=Kazakh kha=Khasi khm=Khmer/Cambodian km=Khmer/Cambodian khi=Khoisan (Other) kho=Khotanese kik=Kikuyu kin=Kinyarwanda rw=Kinyarwanda kir=Kirghiz ky=Kirghiz rn=Kirundi/Rundi run=Kirundi/Rundi kom=Komi kon=Kongo kok=Konkani ko=Korean kor=Korean kpe=Kpelle kro=Kru kua=Kuanyama kum=Kumyk ku=Kurdish kur=Kurdish kru=Kurukh kus=Kusaie kut=Kutenai lad=Ladino lah=Lahnda lam=Lamba lao=Laothian lo=Laothian la=Latin lat=Latin lav=Latvian, Lettish lv=Latvian, Lettish ltz=Letzeburgesch lez=Lezghian lin=Lingala ln=Lingala lit=Lithuanian lt=Lithuanian loz=Lozi lub=Luba-Katanga lui=Luiseno lun=Lunda luo=Luo (Kenya and Tanzania) mac=Macedonian mak=Macedonian mk=Macedonian mad=Madurese mag=Magahi mai=Maithili mak=Makasar mg=Malagasy mlg=Malagasy may=Malay ms=Malay msa=Malay mal=Malayalam mlt=Maltese mt=Maltese ml=Malayalam man=Mandingo mni=Manipuri mno=Manobo languages max=Manx mao=Maori mi=Maori mri=Maori mar=Marathi mr=Marathi chm=Mari mah=Marshall mwr=Marwari mas=Masai myn=Mayan languages men=Mende mic=Micmac min=Minangkabau mis=Miscellaneous (Other) moh=Mohawk mo=Moldavian mol=Moldavian lol=Mongo mn=Mongolian mon=Mongolian mkh=Mon-Kmer (Other) mos=Mossi mul=Multiple languages mun=Munda languages na=Nauru nau=Nauru nav=Navajo nde=Ndebele, North nbl=Ndebele, South ndo=Ndongo ne=Nepali nep=Nepali new=Newari nic=Niger-Kordofanian (Other) ssa=Nilo-Saharan (Other) niu=Niuean non=Norse, Old nai=North American Indian (Other) no=Norwegian nor=Norwegian nno=Norwegian (Nynorsk) nub=Nubian languages nym=Nyamwezi nya=Nyanja nyn=Nyankole nyo=Nyoro nzi=Nzima oc=Occitan/Langue d'Oc (post 1500) oci=Occitan/Langue d'Oc (post 1500) oji=Ojibwa or=Oriya ori=Oriya om=Oromo (Afan) om=Oromo (Afan) orm=Oromo (Afan) osa=Osage oss=Ossetic oto=Otomian languages pal=Pahlavi pau=Palauan pli=Pali pam=Pampanga pag=Pangasinan pan=Panjabi pap=Papiamento paa=Papuan-Australian (Other) ps=Pashto, Pushto pus=Pashto, Pushto fa=Persian fas=Persian per=Persian peo=Persian, Old (ca 600 - 400 B.C.) phn=Phoenician pl=Polish pol=Polish pon=Ponape por=Portuguese pt=Portuguese pra=Prakrit languages pro=Provencal, Old (to 1500) pa=Punjabi pan=Punjabi qu=Quechua que=Quechua raj=Rajasthani rar=Rarotongan rm=Rhaeto-Romance roh=Rhaeto-Romance roa=Romance (Other) ro=Romanian ron=Romanian rum=Romanian rom=Romany ru=Russian rus=Russian sal=Salishan languages sam=Samaritan Aramaic smi=Sami languages sm=Samoan smo=Samoan sad=Sandawe sag=Sangho sg=Sangho sa=Sanskrit san=Sanskrit srd=Sardinian sco=Scots sel=Selkup sem=Semitic (Other) sr=Serbian scr=Serbo-Croatian sh=Serbo-Croatian srr=Serer sot=Sesotho/Sotho, Southern st=Sesotho/Sotho, Southern shn=Shan sn=Shona sna=Shona sid=Sidamo bla=Siksika sd=Sindhi snd=Sindhi si=Sinhalese sin=Sinhalese sit=Sino-Tibetan (Other) sio=Siouan languages ss=Siswati/Siswant ssw=Siswati/Siswant sla=Slavic (Other) sk=Slovak slk=Slovak slo=Slovak sl=Slovenian slv=Slovenian sog=Sogdian so=Somali som=Somali son=Songhai wen=Sorbian languages nso=Sotho, Northern sai=South American Indian (Other) es=Spanish esl=Spanish spa=Spanish suk=Sukuma sux=Sumerian su=Sundanese sun=Sundanese sus=Susu sw=Swahili swa=Swahili ssw=Swazi sv=Swedish sve=Swedish swe=Swedish syr=Syriac tgl=Tagalog tl=Tagalog tah=Tahitian tg=Tajik tgk=Tajik tmh=Tamashek ta=Tamil tam=Tamil tat=Tatar tt=Tatar te=Telugu tel=Telugu ter=Tereno th=Thai tha=Thai bo=Tibetan bod=Tibetan tib=Tibetan tig=Tigre ti=Tigrinya tir=Tigrinya tem=Timne tiv=Tivi tli=Tlingit to=Tonga (Nyasa) tog=Tonga (Nyasa) ton=Tonga (Tonga Islands) tru=Truk tsi=Tsimshian ts=Tsonga tso=Tsonga tn=Tswana/Setswana tsn=Tswana/Setswana tum=Tumbuka tr=Turkish tur=Turkish ota=Turkish, Ottoman (1500 - 1928) tk=Turkmen tuk=Turkmen tyv=Tuvinian tw=Twi twi=Twi uga=Ugaritic ug=Uighur uig=Uighur uk=Ukrainian ukr=Ukrainian umb=Umbundu # should be und=Undetermined, but deliberately changing it und=Other ur=Urdu urd=Urdu uz=Uzbek uzb=Uzbek vai=Vai ven=Venda vi=Vietnamese vie=Vietnamese vo=Volapük vol=Volapük vot=Votic wak=Wakashan languages wal=Walamo war=Waray was=Washo cy=Welsh cym=Welsh wel=Welsh wo=Wolof wol=Wolof xh=Xhosa xh=Xhosa xho=Xhosa sah=Yakut yao=Yao yap=Yap ji=Yiddish yi=Yiddish yid=Yiddish yo=Yoruba yor=Yoruba zap=Zapotec zen=Zenaga za=Zhuang zha=Zhuang zu=Zulu zul=Zulu zun=Zuni # The following additions are specific to sword bs=Bosnian # the following two are wrong in Sword po=Polish ty=Tahitian Index: DefaultBookMetaData.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/basic/DefaultBookMetaData.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DefaultBookMetaData.java 9 Oct 2004 21:45:04 -0000 1.14 --- DefaultBookMetaData.java 25 Jan 2005 00:02:32 -0000 1.15 *************** *** 1,6 **** package org.crosswire.jsword.book.basic; - import java.util.LinkedHashMap; - import java.util.Map; import java.util.Properties; --- 1,4 ---- *************** *** 50,58 **** public DefaultBookMetaData(BookDriver driver, Book book, Properties prop) { ! this.driver = driver; ! this.book = book; ! ! map.putAll(prop); setName(prop.getProperty(BookMetaData.KEY_NAME)); setType(prop.getProperty(BookMetaData.KEY_TYPE)); --- 48,55 ---- public DefaultBookMetaData(BookDriver driver, Book book, Properties prop) { ! setDriver(driver); ! setBook(book); + setProperties(prop); setName(prop.getProperty(BookMetaData.KEY_NAME)); setType(prop.getProperty(BookMetaData.KEY_TYPE)); *************** *** 76,84 **** public DefaultBookMetaData(BookDriver driver, Book book, String name, BookType type) { ! this.driver = driver; ! this.book = book; ! setName(name); setType(type); } --- 73,81 ---- public DefaultBookMetaData(BookDriver driver, Book book, String name, BookType type) { ! setDriver(driver); ! setBook(book); setName(name); setType(type); + setLanguage(null); // Default language } *************** *** 92,111 **** /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getBook() - */ - public Book getBook() - { - return book; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getDriver() - */ - public BookDriver getDriver() - { - return driver; - } - - /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#getName() */ --- 89,92 ---- *************** *** 116,127 **** /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getLanguage() - */ - public String getLanguage() - { - return language; - } - - /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#getInitials() */ --- 97,100 ---- *************** *** 132,174 **** /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getProperties() - */ - public Map getProperties() - { - return map; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getFullName() - */ - public String getFullName() - { - StringBuffer buf = new StringBuffer(getName()); - - if (driver != null) - { - buf.append(" (").append(getDriverName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - return buf.toString(); - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getFullName() - */ - public String getOsisID() - { - return getType().toString() + '.' + getInitials(); - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getDriverName() - */ - public String getDriverName() - { - return driver.getDriverName(); - } - - /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#isLeftToRight() */ --- 105,108 ---- *************** *** 179,217 **** } - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#getIndexStatus() - */ - public IndexStatus getIndexStatus() - { - return indexStatus; - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.BookMetaData#setIndexStatus(java.lang.String) - */ - public void setIndexStatus(IndexStatus newValue) - { - IndexStatus oldValue = this.indexStatus; - this.indexStatus = newValue; - map.put(KEY_INDEXSTATUS, newValue); - firePropertyChange(KEY_INDEXSTATUS, oldValue, newValue); - } - - /** - * @param book The book to set. - */ - public void setBook(Book book) - { - this.book = book; - } - - /** - * @param driver The driver to set. - */ - public void setDriver(BookDriver driver) - { - this.driver = driver; - } - /** * @param language The language to set. --- 113,116 ---- *************** *** 219,232 **** public void setLanguage(String language) { ! if (language == null) ! { ! this.language = ""; //$NON-NLS-1$ ! } ! else ! { ! this.language = language; ! } ! ! map.put(KEY_LANGUAGE, this.language); } --- 118,122 ---- public void setLanguage(String language) { ! putProperty(KEY_LANGUAGE, getLanguage(initials, language)); } *************** *** 255,259 **** } ! map.put(KEY_INITIALS, this.initials); } --- 145,149 ---- } ! putProperty(KEY_INITIALS, this.initials); } *************** *** 268,272 **** this.name = name; ! map.put(KEY_NAME, this.name); setInitials(StringUtil.getInitials(name)); --- 158,162 ---- this.name = name; ! putProperty(KEY_NAME, this.name); setInitials(StringUtil.getInitials(name)); *************** *** 284,288 **** this.type = type; ! map.put(KEY_TYPE, type == null ? "" : type.toString()); //$NON-NLS-1$ } --- 174,178 ---- this.type = type; ! putProperty(KEY_TYPE, type == null ? "" : type.toString()); //$NON-NLS-1$ } *************** *** 301,367 **** } - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object obj) - { - // Since this can not be null - if (obj == null) - { - return false; - } - - // We might consider checking for equality against all BookMetaDatas? - // However currently we dont. - - // Check that that is the same as this - // Don't use instanceof since that breaks inheritance - if (!obj.getClass().equals(this.getClass())) - { - return false; - } - - // The real bit ... - BookMetaData that = (BookMetaData) obj; - - return getName().equals(that.getName()); - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - public int hashCode() - { - return getName().hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() - { - return getFullName(); - } - - /* (non-Javadoc) - * @see java.lang.Comparable#compareTo(java.lang.Object) - */ - public int compareTo(Object obj) - { - BookMetaData that = (BookMetaData) obj; - return this.getName().compareTo(that.getName()); - } - - /** - * - */ - private Map map = new LinkedHashMap(); - private BookType type; ! private Book book; ! private BookDriver driver; ! private String name = ""; //$NON-NLS-1$ ! private String language = ""; //$NON-NLS-1$ ! private String initials = ""; //$NON-NLS-1$ ! private IndexStatus indexStatus = IndexStatus.UNDONE; } --- 191,196 ---- } private BookType type; ! private String name; ! private String initials; } Index: AbstractBookMetaData.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/basic/AbstractBookMetaData.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AbstractBookMetaData.java 9 Oct 2004 21:45:04 -0000 1.16 --- AbstractBookMetaData.java 25 Jan 2005 00:02:32 -0000 1.17 *************** *** 3,10 **** --- 3,21 ---- import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; + import java.util.LinkedHashMap; + import java.util.Locale; + import java.util.Map; + import java.util.MissingResourceException; + import java.util.ResourceBundle; import javax.swing.event.EventListenerList; + import org.crosswire.common.util.CWClassLoader; + import org.crosswire.common.util.Logger; + import org.crosswire.common.util.StringUtil; + import org.crosswire.jsword.book.Book; + import org.crosswire.jsword.book.BookDriver; import org.crosswire.jsword.book.BookMetaData; + import org.crosswire.jsword.book.IndexStatus; /** *************** *** 35,38 **** --- 46,291 ---- { /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getBook() + */ + public Book getBook() + { + return book; + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getDriver() + */ + public BookDriver getDriver() + { + return driver; + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getDriverName() + */ + public String getDriverName() + { + if (getDriver() == null) + { + return null; + } + + return getDriver().getDriverName(); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getFullName() + */ + public String getOsisID() + { + return getType().toString() + '.' + getInitials(); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getFullName() + */ + public String getFullName() + { + if (fullName == null) + { + fullName = computeFullName(); + } + return fullName; + } + + /** + * + */ + private String computeFullName() + { + StringBuffer buf = new StringBuffer(getName()); + + if (getDriver() != null) + { + buf.append(" (").append(getDriverName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + return buf.toString(); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getLanguage() + */ + public String getLanguage() + { + return (String) getProperty(KEY_LANGUAGE); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getProperties() + */ + public Map getProperties() + { + return prop; + } + + /** + * @param newProperties + */ + public void setProperties(Map newProperties) + { + prop = newProperties; + } + + /** + * @param key + * @return the object found by the key + */ + protected Object getProperty(String key) + { + return prop.get(key); + } + + /** + * @param key + * @param value + */ + protected void putProperty(String key, Object value) + { + prop.put(key, value); + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#getIndexStatus() + */ + public IndexStatus getIndexStatus() + { + return indexStatus; + } + + /* (non-Javadoc) + * @see org.crosswire.jsword.book.BookMetaData#setIndexStatus(java.lang.String) + */ + public void setIndexStatus(IndexStatus newValue) + { + IndexStatus oldValue = this.indexStatus; + this.indexStatus = newValue; + prop.put(KEY_INDEXSTATUS, newValue); + firePropertyChange(KEY_INDEXSTATUS, oldValue, newValue); + } + + /** + * @param book The book to set. + */ + public void setBook(Book book) + { + this.book = book; + } + + /** + * @param driver The driver to set. + */ + public void setDriver(BookDriver driver) + { + this.driver = driver; + } + + + /** + * Get the language name from the language code. Note, this code does not support dialects. + * @param iso639Code + * @return the name of the language + */ + protected String getLanguage(String ident, String iso639Code) + { + String lookup = iso639Code; + if (lookup == null || lookup.length() == 0) + { + log.warn("Book " + ident + " named " + getName() + " has no language specified. Assuming English."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + return getLanguage(ident, DEFAULT_LANG_CODE); + } + + if (lookup.indexOf('_') != -1) + { + String[] locale = StringUtil.split(lookup, '_'); + return getLanguage(ident, locale[0]); + } + + char firstLangChar = lookup.charAt(0); + // If the language begins w/ an x then it is "Undetermined" + // Also if it is not a 2 or 3 character code then it is not a valid + // iso639 code. + if (firstLangChar == 'x' || firstLangChar == 'X' || lookup.length() > 3) + { + return getLanguage(ident, UNKNOWN_LANG_CODE); + } + + try + { + return languages.getString(lookup); + } + catch (MissingResourceException e) + { + log.error("Not a valid language code:" + iso639Code + " in book " + ident); //$NON-NLS-1$ //$NON-NLS-2$ + return getLanguage(ident, UNKNOWN_LANG_CODE); + } + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object obj) + { + // Since this can not be null + if (obj == null) + { + return false; + } + + // We might consider checking for equality against all BookMetaDatas? + // However currently we dont. + + // Check that that is the same as this + // Don't use instanceof since that breaks inheritance + if (!obj.getClass().equals(this.getClass())) + { + return false; + } + + // The real bit ... + BookMetaData that = (BookMetaData) obj; + + return getName().equals(that.getName()); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + public int hashCode() + { + return getName().hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + public int compareTo(Object obj) + { + BookMetaData that = (BookMetaData) obj; + return this.getInitials().compareTo(that.getInitials()); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + public String toString() + { + if (displayName == null) + { + StringBuffer buf = new StringBuffer("["); //$NON-NLS-1$ + buf.append(getInitials()); + buf.append("] - "); //$NON-NLS-1$ + buf.append(getFullName()); + displayName = buf.toString(); + } + return displayName; + } + + /* (non-Javadoc) * @see org.crosswire.jsword.book.BookMetaData#addPropertyChangeListener(java.beans.PropertyChangeListener) */ *************** *** 95,100 **** --- 348,385 ---- /** + * The log stream + */ + private static final Logger log = Logger.getLogger(AbstractBookMetaData.class); + + private static final String DEFAULT_LANG_CODE = "en"; //$NON-NLS-1$ + private static final String UNKNOWN_LANG_CODE = "und"; //$NON-NLS-1$ + + /** * The list of property change listeners */ private transient EventListenerList listeners; + + private static/*final*/ResourceBundle languages; + static + { + try + { + languages = ResourceBundle.getBundle("iso639", Locale.getDefault(), new CWClassLoader()); //$NON-NLS-1$; + } + catch (MissingResourceException e) + { + assert false; + } + } + + /** + * The single key version of the properties + */ + private Map prop = new LinkedHashMap(); + + private Book book; + private BookDriver driver; + private String fullName; + private String displayName; + private IndexStatus indexStatus = IndexStatus.UNDONE; } From jswordcvs at crosswire.org Tue Jan 25 17:57:30 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:32 2005 Subject: [jsword-svn] common/java/core/org/crosswire/common/util s Message-ID: <200501260057.j0Q0vUl4004939@www.crosswire.org> Update of /cvs/jsword/common/java/core/org/crosswire/common/util In directory www.crosswire.org:/tmp/cvs-serv4935/java/core/org/crosswire/common/util Modified Files: IOUtil.java Log Message: Fixed a couple of bugs. Index: IOUtil.java =================================================================== RCS file: /cvs/jsword/common/java/core/org/crosswire/common/util/IOUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOUtil.java 28 Nov 2004 21:36:31 -0000 1.2 --- IOUtil.java 26 Jan 2005 00:57:27 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- import java.io.InputStream; import java.io.OutputStream; + import java.net.MalformedURLException; import java.net.URL; import java.util.Enumeration; *************** *** 44,53 **** /** ! * Unpack a zip file to a given directory * @param file The zip file to download * @param destdir The directory to unpack up * @throws IOException If there is an file error */ ! public static void unpackZip(File file, URL destdir) throws IOException { // unpack the zip. --- 45,55 ---- /** ! * Unpack a zip file to a given directory. Honor the paths ! * as given in the zip file. * @param file The zip file to download * @param destdir The directory to unpack up * @throws IOException If there is an file error */ ! public static void unpackZip(File file, File destdir) throws IOException { // unpack the zip. *************** *** 59,64 **** ZipEntry entry = (ZipEntry) entries.nextElement(); String entrypath = entry.getName(); ! String filename = entrypath.substring(entrypath.lastIndexOf('/') + 1); ! URL child = NetUtil.lengthenURL(destdir, filename); OutputStream dataOut = NetUtil.getOutputStream(child); --- 61,79 ---- ZipEntry entry = (ZipEntry) entries.nextElement(); String entrypath = entry.getName(); ! File entryFile = new File(destdir, entrypath); ! File parentDir = entryFile.getParentFile(); ! // Is it already a directory ? ! if (!parentDir.isDirectory()) ! { ! parentDir.mkdirs(); ! ! // Did that work? ! if (!parentDir.isDirectory()) ! { ! throw new MalformedURLException(Msg.CREATE_DIR_FAIL.toString(parentDir.toString())); ! } ! } ! ! URL child = NetUtil.getURL(entryFile); OutputStream dataOut = NetUtil.getOutputStream(child); From jswordcvs at crosswire.org Tue Jan 25 17:57:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:38 2005 Subject: [jsword-svn] jsword/java/limbo/org/crosswire/jsword/book/search/ser s Message-ID: <200501260057.j0Q0vZQe004972@www.crosswire.org> Update of /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser In directory www.crosswire.org:/tmp/cvs-serv4948/java/limbo/org/crosswire/jsword/book/search/ser Modified Files: SerIndexManager.java Log Message: Fixed a couple of bugs. Index: SerIndexManager.java =================================================================== RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser/SerIndexManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SerIndexManager.java 15 Oct 2004 23:28:07 -0000 1.3 --- SerIndexManager.java 26 Jan 2005 00:57:33 -0000 1.4 *************** *** 118,122 **** URL storage = getStorageArea(bmd); File zip = NetUtil.getAsFile(tempDest); ! IOUtil.unpackZip(zip, storage); } catch (IOException ex) --- 118,122 ---- URL storage = getStorageArea(bmd); File zip = NetUtil.getAsFile(tempDest); ! IOUtil.unpackZip(zip, NetUtil.getAsFile(storage)); } catch (IOException ex) From jswordcvs at crosswire.org Tue Jan 25 17:57:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:38 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install s Message-ID: <200501260057.j0Q0vZdo004978@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install In directory www.crosswire.org:/tmp/cvs-serv4948/java/jsword/org/crosswire/jsword/book/install Modified Files: Installer.java Log Message: Fixed a couple of bugs. Index: Installer.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/Installer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Installer.java 15 Oct 2004 23:28:07 -0000 1.8 --- Installer.java 26 Jan 2005 00:57:33 -0000 1.9 *************** *** 52,61 **** /** - * @param bmd The book meta-data to get a URL from. - * @return the url for the directory for BookMetaData - */ - public URL toLocalURL(BookMetaData bmd); - - /** * Get a list of BookMetaData objects that represent downloadable modules. * If no list has been retrieved from the remote source using reloadIndex() --- 52,55 ---- From jswordcvs at crosswire.org Tue Jan 25 17:57:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:40 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/search/lucene s Message-ID: <200501260057.j0Q0vZ3P004991@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene In directory www.crosswire.org:/tmp/cvs-serv4948/java/jsword/org/crosswire/jsword/book/search/lucene Modified Files: LuceneIndexManager.java Log Message: Fixed a couple of bugs. Index: LuceneIndexManager.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndexManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LuceneIndexManager.java 15 Oct 2004 23:28:08 -0000 1.3 --- LuceneIndexManager.java 26 Jan 2005 00:57:33 -0000 1.4 *************** *** 121,125 **** URL storage = getStorageArea(bmd); File zip = NetUtil.getAsFile(tempDest); ! IOUtil.unpackZip(zip, storage); } catch (IOException ex) --- 121,125 ---- URL storage = getStorageArea(bmd); File zip = NetUtil.getAsFile(tempDest); ! IOUtil.unpackZip(zip, NetUtil.getAsFile(storage)); } catch (IOException ex) From jswordcvs at crosswire.org Tue Jan 25 17:57:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:40 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install/sword s Message-ID: <200501260057.j0Q0vZnM004982@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword In directory www.crosswire.org:/tmp/cvs-serv4948/java/jsword/org/crosswire/jsword/book/install/sword Modified Files: HttpSwordInstaller.java AbstractSwordInstaller.java Log Message: Fixed a couple of bugs. Index: AbstractSwordInstaller.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractSwordInstaller.java 24 Jan 2005 23:28:01 -0000 1.3 --- AbstractSwordInstaller.java 26 Jan 2005 00:57:33 -0000 1.4 *************** *** 28,32 **** import org.crosswire.jsword.book.install.InstallException; import org.crosswire.jsword.book.install.Installer; - import org.crosswire.jsword.book.sword.ModuleType; import org.crosswire.jsword.book.sword.SwordBookDriver; import org.crosswire.jsword.book.sword.SwordBookMetaData; --- 28,31 ---- *************** *** 73,106 **** /* (non-Javadoc) ! * @see org.crosswire.jsword.book.install.Installer#toLocalURL(org.crosswire.jsword.book.BookMetaData) */ ! public URL toLocalURL(BookMetaData bmd) { ! File fulldir = toLocalDirectory(bmd); try { ! return new URL(NetUtil.PROTOCOL_FILE, null, fulldir.getAbsolutePath()); } catch (MalformedURLException ex) { ! log.error("Failed to create URL for file: "+fulldir, ex); //$NON-NLS-1$ assert false; ! return null; } - } - - /* (non-Javadoc) - * @see org.crosswire.jsword.book.install.Installer#isNewer(org.crosswire.jsword.book.BookMetaData) - */ - public boolean isNewer(BookMetaData bmd) - { - URL local = toLocalURL(bmd); - - SwordBookMetaData sbmd = (SwordBookMetaData) bmd; - URL conf = NetUtil.lengthenURL(local, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF); URL remote = toRemoteURL(bmd); ! return NetUtil.isNewer(remote, conf); } --- 72,100 ---- /* (non-Javadoc) ! * @see org.crosswire.jsword.book.install.Installer#isNewer(org.crosswire.jsword.book.BookMetaData) */ ! public boolean isNewer(BookMetaData bmd) { ! SwordBookMetaData sbmd = (SwordBookMetaData) bmd; ! File dldir = SwordBookDriver.getDownloadDir(); ! ! File confdir = new File(dldir, SwordConstants.DIR_CONF); ! File conf = new File(confdir, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF); + URL configurl = null; try { ! configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath()); ! } catch (MalformedURLException ex) { ! log.error("Failed to create URL for file: " + conf, ex); //$NON-NLS-1$ assert false; ! return false; } URL remote = toRemoteURL(bmd); ! return NetUtil.isNewer(remote, configurl); } *************** *** 165,185 **** job.setProgress(Msg.JOB_INIT.toString()); - URL desturl = toLocalURL(sbmd); - NetUtil.makeDirectory(desturl); - URL temp = NetUtil.getTemporaryURL("swd", ZIP_SUFFIX); //$NON-NLS-1$ download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp); - IOUtil.unpackZip(NetUtil.getAsFile(temp), desturl); - File dldir = SwordBookDriver.getDownloadDir(); ! job.setProgress(Msg.JOB_CONFIG.toString()); ! File confdir = new File(dldir, SwordConstants.DIR_CONF); ! confdir.mkdirs(); ! File conf = new File(confdir, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF); ! URL configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath()); ! sbmd.save(configurl); SwordBookDriver.registerNewBook(sbmd, dldir); } --- 159,170 ---- job.setProgress(Msg.JOB_INIT.toString()); URL temp = NetUtil.getTemporaryURL("swd", ZIP_SUFFIX); //$NON-NLS-1$ download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp); File dldir = SwordBookDriver.getDownloadDir(); ! IOUtil.unpackZip(NetUtil.getAsFile(temp), dldir); + job.setProgress(Msg.JOB_CONFIG.toString()); SwordBookDriver.registerNewBook(sbmd, dldir); } *************** *** 211,215 **** { URL scratchfile = getCachedIndexFile(); ! download(job, LIST_DIR + '/' + directory, FILE_LIST_GZ, scratchfile); loaded = false; } --- 196,200 ---- { URL scratchfile = getCachedIndexFile(); ! download(job, directory + '/' + LIST_DIR, FILE_LIST_GZ, scratchfile); loaded = false; } *************** *** 366,370 **** try { ! URL scratchdir = Project.instance().getTempScratchSpace(getTempFileExtension(host, directory), false); return NetUtil.lengthenURL(scratchdir, FILE_LIST_GZ); } --- 351,355 ---- try { ! URL scratchdir = Project.instance().getTempScratchSpace(getTempFileExtension(host, directory), true); return NetUtil.lengthenURL(scratchdir, FILE_LIST_GZ); } *************** *** 383,408 **** } - /** - * Get a local directory to which a book is installed - */ - protected File toLocalDirectory(BookMetaData bmd) - { - if (!(bmd instanceof SwordBookMetaData)) - { - assert false; - return null; - } - - SwordBookMetaData sbmd = (SwordBookMetaData) bmd; - - ModuleType type = sbmd.getModuleType(); - String modpath = type.getInstallDirectory(); - String destname = modpath + '/' + sbmd.getDiskName(); - - File dldir = SwordBookDriver.getDownloadDir(); - File moddir = new File(dldir, SwordConstants.DIR_DATA); - return new File(moddir, destname); - } - /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) --- 368,371 ---- Index: HttpSwordInstaller.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/HttpSwordInstaller.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** HttpSwordInstaller.java 24 Jan 2005 23:28:27 -0000 1.14 --- HttpSwordInstaller.java 26 Jan 2005 00:57:33 -0000 1.15 *************** *** 80,84 **** try { ! URL url = new URL("http://" + host + dir + '/' + file); //$NON-NLS-1$ copy(job, url, dest); } --- 80,84 ---- try { ! URL url = new URL(NetUtil.PROTOCOL_HTTP, host, dir + '/' + file); //$NON-NLS-1$ copy(job, url, dest); } From jswordcvs at crosswire.org Tue Jan 25 17:57:35 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 17:57:40 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/sword s Message-ID: <200501260057.j0Q0vZeZ004987@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword In directory www.crosswire.org:/tmp/cvs-serv4948/java/jsword/org/crosswire/jsword/book/sword Modified Files: ModuleType.java Log Message: Fixed a couple of bugs. Index: ModuleType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ModuleType.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ModuleType.java 24 Jan 2005 23:29:45 -0000 1.11 --- ModuleType.java 26 Jan 2005 00:57:33 -0000 1.12 *************** *** 38,42 **** * Uncompressed Bibles */ ! public static final ModuleType RAW_TEXT = new ModuleType("RawText", "texts/rawtext", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 38,42 ---- * Uncompressed Bibles */ ! public static final ModuleType RAW_TEXT = new ModuleType("RawText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 53,57 **** * Serialization ID */ ! private static final long serialVersionUID = 3257004341402874419L; }; --- 53,57 ---- * Serialization ID */ ! private static final long serialVersionUID = 3544385920414529336L; }; *************** *** 59,63 **** * Compressed Bibles */ ! public static final ModuleType Z_TEXT = new ModuleType("zText", "texts/ztext", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 59,63 ---- * Compressed Bibles */ ! public static final ModuleType Z_TEXT = new ModuleType("zText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 79,83 **** * Serialization ID */ ! private static final long serialVersionUID = 3258697597915772985L; }; --- 79,83 ---- * Serialization ID */ ! private static final long serialVersionUID = 3257846571620906039L; }; *************** *** 85,89 **** * Uncompressed Commentaries */ ! public static final ModuleType RAW_COM = new ModuleType("RawCom", "comments/rawcom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 85,89 ---- * Uncompressed Commentaries */ ! public static final ModuleType RAW_COM = new ModuleType("RawCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 100,104 **** * Serialization ID */ ! private static final long serialVersionUID = 3762250850940433716L; }; --- 100,104 ---- * Serialization ID */ ! private static final long serialVersionUID = 3258129141898294837L; }; *************** *** 106,110 **** * Compressed Commentaries */ ! public static final ModuleType Z_COM = new ModuleType("zCom", "comments/zcom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 106,110 ---- * Compressed Commentaries */ ! public static final ModuleType Z_COM = new ModuleType("zCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 126,130 **** * Serialization ID */ ! private static final long serialVersionUID = 3257008752367580211L; }; --- 126,130 ---- * Serialization ID */ ! private static final long serialVersionUID = 3257569516166002487L; }; *************** *** 132,136 **** * Uncompresses HREF Commentaries */ ! public static final ModuleType HREF_COM = new ModuleType("HREFCom", "comments/hrefcom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 132,136 ---- * Uncompresses HREF Commentaries */ ! public static final ModuleType HREF_COM = new ModuleType("HREFCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 147,151 **** * Serialization ID */ ! private static final long serialVersionUID = 3257567291372548153L; }; --- 147,151 ---- * Serialization ID */ ! private static final long serialVersionUID = 3256439209706338354L; }; *************** *** 153,157 **** * Uncompressed Commentaries */ ! public static final ModuleType RAW_FILES = new ModuleType("RawFiles", "comments/rawfiles", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 153,157 ---- * Uncompressed Commentaries */ ! public static final ModuleType RAW_FILES = new ModuleType("RawFiles", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 168,172 **** * Serialization ID */ ! private static final long serialVersionUID = 3257005475290625843L; }; --- 168,172 ---- * Serialization ID */ ! private static final long serialVersionUID = 3256446901875325236L; }; *************** *** 174,178 **** * 2-Byte Index Uncompressed Dictionaries */ ! public static final ModuleType RAW_LD = new ModuleType("RawLD", "lexdict/rawld", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 174,178 ---- * 2-Byte Index Uncompressed Dictionaries */ ! public static final ModuleType RAW_LD = new ModuleType("RawLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 189,193 **** * Serialization ID */ ! private static final long serialVersionUID = 3258412833061352242L; }; --- 189,193 ---- * Serialization ID */ ! private static final long serialVersionUID = 3257290240195442745L; }; *************** *** 195,199 **** * 4-Byte Index Uncompressed Dictionaries */ ! public static final ModuleType RAW_LD4 = new ModuleType("RawLD4", "lexdict/rawld4", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 195,199 ---- * 4-Byte Index Uncompressed Dictionaries */ ! public static final ModuleType RAW_LD4 = new ModuleType("RawLD4", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 210,214 **** * Serialization ID */ ! private static final long serialVersionUID = 3258689892711149625L; }; --- 210,214 ---- * Serialization ID */ ! private static final long serialVersionUID = 3689067356945331762L; }; *************** *** 216,220 **** * Compressed Dictionaries */ ! public static final ModuleType Z_LD = new ModuleType("zLD", "lexdict/zld", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 216,220 ---- * Compressed Dictionaries */ ! public static final ModuleType Z_LD = new ModuleType("zLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 231,235 **** * Serialization ID */ ! private static final long serialVersionUID = 3257849883074573619L; }; --- 231,235 ---- * Serialization ID */ ! private static final long serialVersionUID = 3691037673259414067L; }; *************** *** 237,241 **** * Generic Books */ ! public static final ModuleType RAW_GEN_BOOK = new ModuleType("RawGenBook", "genbook/rawgenbook", null) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) --- 237,241 ---- * Generic Books */ ! public static final ModuleType RAW_GEN_BOOK = new ModuleType("RawGenBook", null) //$NON-NLS-1$ //$NON-NLS-2$ { protected Book getBook(SwordBookMetaData sbmd, Backend backend) *************** *** 252,256 **** * Serialization ID */ ! private static final long serialVersionUID = 3257849895976449588L; }; --- 252,256 ---- * Serialization ID */ ! private static final long serialVersionUID = 3257290218703892528L; }; *************** *** 258,265 **** * Simple ctor */ ! public ModuleType(String name, String install, BookType type) { this.name = name; - this.install = install; this.type = type; } --- 258,264 ---- * Simple ctor */ ! public ModuleType(String name, BookType type) { this.name = name; this.type = type; } *************** *** 285,297 **** /** - * Strings for where the modules are installed. - * @return Returns the install directory for this module type. - */ - public String getInstallDirectory() - { - return install; - } - - /** * The book type of this module */ --- 284,287 ---- *************** *** 378,387 **** /** - * Where are modules of this type installed relative to the sword module - * directory? - */ - private String install; - - /** * What booktype is this module */ --- 368,371 ---- *************** *** 432,436 **** // Support for serialization - static final long serialVersionUID = 1417463751329673026L; private static int nextObj; private final int obj = nextObj++; --- 416,419 ---- From jswordcvs at crosswire.org Tue Jan 25 18:40:44 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 18:40:46 2005 Subject: [jsword-svn] jsword/jar/net-1.3.0 - New directorys Message-ID: <200501260140.j0Q1eiX8005407@www.crosswire.org> Update of /cvs/jsword/jsword/jar/net-1.3.0 In directory www.crosswire.org:/tmp/cvs-serv5403/jar/net-1.3.0 Log Message: Directory /cvs/jsword/jsword/jar/net-1.3.0 added to the repository From jswordcvs at crosswire.org Tue Jan 25 18:41:57 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 18:42:00 2005 Subject: [jsword-svn] jsword/jar/net-1.3.0 s Message-ID: <200501260141.j0Q1fv7t005459@www.crosswire.org> Update of /cvs/jsword/jsword/jar/net-1.3.0 In directory www.crosswire.org:/tmp/cvs-serv5452/jar/net-1.3.0 Added Files: commons-net-1.3.0.jar LICENSE.txt Log Message: Updating commons-net --- NEW FILE: commons-net-1.3.0.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: LICENSE.txt --- Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. From jswordcvs at crosswire.org Tue Jan 25 19:18:28 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:18:30 2005 Subject: [jsword-svn] jsword-web s Message-ID: <200501260218.j0Q2ISgC005774@www.crosswire.org> Update of /cvs/jsword/jsword-web In directory www.crosswire.org:/tmp/cvs-serv5770 Modified Files: jsword-web.iml Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: jsword-web.iml =================================================================== RCS file: /cvs/jsword/jsword-web/jsword-web.iml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jsword-web.iml 28 Nov 2004 21:33:48 -0000 1.1 --- jsword-web.iml 26 Jan 2005 02:18:26 -0000 1.2 *************** *** 70,81 **** ! jar://$MODULE_DIR$/../jsword/jar/lucene-1.4.1/lucene-1.4.1.jar!/ ! ! jar://$MODULE_DIR$/../jsword/jar/net-1.1.0/commons-net-1.1.0.jar!/ ! --- 70,81 ---- ! jar://$MODULE_DIR$/../jsword/jar/lucene-1.4.3/lucene-1.4.3.jar!/ ! ! jar://$MODULE_DIR$/../jsword/jar/net-1.3.0/commons-net-1.3.0.jar!/ ! From jswordcvs at crosswire.org Tue Jan 25 19:18:31 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:18:32 2005 Subject: [jsword-svn] bibledesktop/etc/jnlp s Message-ID: <200501260218.j0Q2IVwl005803@www.crosswire.org> Update of /cvs/jsword/bibledesktop/etc/jnlp In directory www.crosswire.org:/tmp/cvs-serv5783/etc/jnlp Modified Files: bibledesktop.jnlp Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: bibledesktop.jnlp =================================================================== RCS file: /cvs/jsword/bibledesktop/etc/jnlp/bibledesktop.jnlp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** bibledesktop.jnlp 21 Sep 2004 17:46:47 -0000 1.10 --- bibledesktop.jnlp 26 Jan 2005 02:18:29 -0000 1.11 *************** *** 33,38 **** ! ! --- 33,38 ---- ! ! From jswordcvs at crosswire.org Tue Jan 25 19:18:31 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:18:32 2005 Subject: [jsword-svn] bibledesktop s Message-ID: <200501260218.j0Q2IVKg005809@www.crosswire.org> Update of /cvs/jsword/bibledesktop In directory www.crosswire.org:/tmp/cvs-serv5783 Modified Files: build.xml Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: build.xml =================================================================== RCS file: /cvs/jsword/bibledesktop/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 21 Sep 2004 17:46:47 -0000 1.13 --- build.xml 26 Jan 2005 02:18:29 -0000 1.14 *************** *** 34,43 **** ! ! --- 34,43 ---- ! ! From jswordcvs at crosswire.org Tue Jan 25 19:19:07 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:08 2005 Subject: [jsword-svn] jsword-support/othersource s Message-ID: <200501260219.j0Q2J78V005862@www.crosswire.org> Update of /cvs/jsword/jsword-support/othersource In directory www.crosswire.org:/tmp/cvs-serv5830/othersource Added Files: commons-net-1.3.0-src.zip lucene-1.4.3-src.zip Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 --- NEW FILE: lucene-1.4.3-src.zip --- (This appears to be a binary file; contents omitted.) --- NEW FILE: commons-net-1.3.0-src.zip --- (This appears to be a binary file; contents omitted.) From jswordcvs at crosswire.org Tue Jan 25 19:19:07 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:09 2005 Subject: [jsword-svn] jsword-support/tools/findbugs-0.8.4 s Message-ID: <200501260219.j0Q2J7cI005858@www.crosswire.org> Update of /cvs/jsword/jsword-support/tools/findbugs-0.8.4 In directory www.crosswire.org:/tmp/cvs-serv5830/tools/findbugs-0.8.4 Modified Files: build.xml Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: build.xml =================================================================== RCS file: /cvs/jsword/jsword-support/tools/findbugs-0.8.4/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** build.xml 21 Sep 2004 17:46:49 -0000 1.4 --- build.xml 26 Jan 2005 02:19:05 -0000 1.5 *************** *** 42,49 **** ! ! --- 42,49 ---- ! ! From jswordcvs at crosswire.org Tue Jan 25 19:19:10 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:12 2005 Subject: [jsword-svn] jsword/jar/lucene-1.4.3 - New directorys Message-ID: <200501260219.j0Q2JAsS005904@www.crosswire.org> Update of /cvs/jsword/jsword/jar/lucene-1.4.3 In directory www.crosswire.org:/tmp/cvs-serv5876/jar/lucene-1.4.3 Log Message: Directory /cvs/jsword/jsword/jar/lucene-1.4.3 added to the repository From jswordcvs at crosswire.org Tue Jan 25 19:19:21 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:23 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/passage s Message-ID: <200501260219.j0Q2JLsc005936@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage In directory www.crosswire.org:/tmp/cvs-serv5915/java/jsword/org/crosswire/jsword/passage Modified Files: PassageListType.java Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: PassageListType.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/PassageListType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PassageListType.java 8 Sep 2004 19:55:07 -0000 1.3 --- PassageListType.java 26 Jan 2005 02:19:19 -0000 1.4 *************** *** 52,55 **** --- 52,60 ---- return ref.countVerses(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 4050199730607109682L; }; *************** *** 76,79 **** --- 81,89 ---- return ref.countRanges(restrict); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3834030242750083129L; }; From jswordcvs at crosswire.org Tue Jan 25 19:19:21 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:23 2005 Subject: [jsword-svn] jsword/jar/lucene-1.4.3 s Message-ID: <200501260219.j0Q2JLjt005942@www.crosswire.org> Update of /cvs/jsword/jsword/jar/lucene-1.4.3 In directory www.crosswire.org:/tmp/cvs-serv5915/jar/lucene-1.4.3 Added Files: lucene-1.4.3.jar LICENSE.txt Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 --- NEW FILE: LICENSE.txt --- /** * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --- NEW FILE: lucene-1.4.3.jar --- (This appears to be a binary file; contents omitted.) From jswordcvs at crosswire.org Tue Jan 25 19:19:21 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Tue Jan 25 19:19:23 2005 Subject: [jsword-svn] jsword s Message-ID: <200501260219.j0Q2JL3l005947@www.crosswire.org> Update of /cvs/jsword/jsword In directory www.crosswire.org:/tmp/cvs-serv5915 Modified Files: .classpath jsword.iml Log Message: Upgrading lucene 1.4.1 to 1.4.3 and commons-net from 1.1 to 1.3 Index: .classpath =================================================================== RCS file: /cvs/jsword/jsword/.classpath,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** .classpath 2 Sep 2004 17:43:10 -0000 1.38 --- .classpath 26 Jan 2005 02:19:19 -0000 1.39 *************** *** 2,7 **** ! ! --- 2,7 ---- ! ! Index: jsword.iml =================================================================== RCS file: /cvs/jsword/jsword/jsword.iml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jsword.iml 28 Nov 2004 21:34:44 -0000 1.1 --- jsword.iml 26 Jan 2005 02:19:19 -0000 1.2 *************** *** 18,22 **** ! --- 18,22 ---- ! *************** *** 36,40 **** ! --- 36,40 ---- ! From jswordcvs at crosswire.org Wed Jan 26 19:18:37 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Wed Jan 26 19:18:39 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s Message-ID: <200501270218.j0R2IbcO021187@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book In directory www.crosswire.org:/tmp/cvs-serv21172/java/jsword/org/crosswire/jsword/book Modified Files: BookData.java Log Message: Fixed the searching to return all hits. Problem was that it was using a Tally Passage. Index: BookData.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BookData.java 30 Aug 2004 09:27:07 -0000 1.7 --- BookData.java 27 Jan 2005 02:18:35 -0000 1.8 *************** *** 86,91 **** if (data instanceof Element) { ! String txt = OSISUtil.getPlainText((Element) data); ! buffer.append(txt); } } --- 86,95 ---- if (data instanceof Element) { ! Element ele = (Element) data; ! if (ele.getName().equals(OSISUtil.OSIS_ELEMENT_VERSE)) ! { ! String txt = OSISUtil.getPlainText((Element) data); ! buffer.append(txt); ! } } } From jswordcvs at crosswire.org Wed Jan 26 19:18:37 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Wed Jan 26 19:18:40 2005 Subject: [jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/search/lucene s Message-ID: <200501270218.j0R2IbeF021180@www.crosswire.org> Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene In directory www.crosswire.org:/tmp/cvs-serv21172/java/jsword/org/crosswire/jsword/book/search/lucene Modified Files: LuceneIndex.java Log Message: Fixed the searching to return all hits. Problem was that it was using a Tally Passage. Index: LuceneIndex.java =================================================================== RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LuceneIndex.java 9 Oct 2004 21:45:05 -0000 1.2 --- LuceneIndex.java 27 Jan 2005 02:18:34 -0000 1.3 *************** *** 35,39 **** import org.crosswire.jsword.passage.NoSuchKeyException; import org.crosswire.jsword.passage.NoSuchVerseException; - import org.crosswire.jsword.passage.PassageTally; import org.crosswire.jsword.passage.Verse; import org.crosswire.jsword.passage.VerseFactory; --- 35,38 ---- *************** *** 140,144 **** checkActive(); ! PassageTally tally = new PassageTally(); if (search != null) --- 139,144 ---- checkActive(); ! Key tally = book.createEmptyKeyList(); ! // Tally tally = new PassageTally(); if (search != null) *************** *** 155,160 **** { Verse verse = VerseFactory.fromString(hits.doc(i).get(LuceneIndex.FIELD_NAME)); ! int score = (int) (hits.score(i) * 100); ! tally.add(verse, score); } } --- 155,161 ---- { Verse verse = VerseFactory.fromString(hits.doc(i).get(LuceneIndex.FIELD_NAME)); ! // int score = (int) (hits.score(i) * 100); ! // tally.add(verse, score); ! tally.addAll(verse); } } *************** *** 243,250 **** { BookData data = book.getData(subkey); ! Reader reader = new StringReader(data.getPlainText()); Document doc = new Document(); ! doc.add(Field.Text(FIELD_NAME, subkey.getName())); doc.add(Field.Text(FIELD_BODY, reader)); --- 244,252 ---- { BookData data = book.getData(subkey); ! String text = data.getPlainText(); ! Reader reader = new StringReader(text); Document doc = new Document(); ! doc.add(Field.UnIndexed(FIELD_NAME, subkey.getName())); doc.add(Field.Text(FIELD_BODY, reader)); From jswordcvs at crosswire.org Sun Jan 30 11:25:57 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:25:59 2005 Subject: [jsword-svn] jsword-web s Message-ID: <200501301825.j0UIPvmv015506@www.crosswire.org> Update of /cvs/jsword/jsword-web In directory www.crosswire.org:/tmp/cvs-serv15483 Modified Files: jsword-web.iml Log Message: Renamed jdom.jar to jdom-1.0.jar Index: jsword-web.iml =================================================================== RCS file: /cvs/jsword/jsword-web/jsword-web.iml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jsword-web.iml 26 Jan 2005 02:18:26 -0000 1.2 --- jsword-web.iml 30 Jan 2005 18:25:55 -0000 1.3 *************** *** 45,51 **** ! jar://$MODULE_DIR$/../common/jar/jdom-1.0/jdom.jar!/ ! --- 45,51 ---- ! jar://$MODULE_DIR$/../common/jar/jdom-1.0/jdom-1.0.jar!/ ! From jswordcvs at crosswire.org Sun Jan 30 11:26:00 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:01 2005 Subject: [jsword-svn] bibledesktop s Message-ID: <200501301826.j0UIQ0c4015543@www.crosswire.org> Update of /cvs/jsword/bibledesktop In directory www.crosswire.org:/tmp/cvs-serv15515 Modified Files: build.xml Log Message: Renamed jdom.jar to jdom-1.0.jar Index: build.xml =================================================================== RCS file: /cvs/jsword/bibledesktop/build.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** build.xml 26 Jan 2005 02:18:29 -0000 1.14 --- build.xml 30 Jan 2005 18:25:58 -0000 1.15 *************** *** 36,40 **** ! --- 36,40 ---- ! From jswordcvs at crosswire.org Sun Jan 30 11:26:00 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:01 2005 Subject: [jsword-svn] bibledesktop/etc/jnlp s Message-ID: <200501301826.j0UIQ0ko015537@www.crosswire.org> Update of /cvs/jsword/bibledesktop/etc/jnlp In directory www.crosswire.org:/tmp/cvs-serv15515/etc/jnlp Modified Files: bibledesktop.jnlp Log Message: Renamed jdom.jar to jdom-1.0.jar Index: bibledesktop.jnlp =================================================================== RCS file: /cvs/jsword/bibledesktop/etc/jnlp/bibledesktop.jnlp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** bibledesktop.jnlp 26 Jan 2005 02:18:29 -0000 1.11 --- bibledesktop.jnlp 30 Jan 2005 18:25:58 -0000 1.12 *************** *** 30,34 **** ! --- 30,34 ---- ! From jswordcvs at crosswire.org Sun Jan 30 11:26:07 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:08 2005 Subject: [jsword-svn] common/jar/jdom-1.0 s Message-ID: <200501301826.j0UIQ7qg015588@www.crosswire.org> Update of /cvs/jsword/common/jar/jdom-1.0 In directory www.crosswire.org:/tmp/cvs-serv15556/jar/jdom-1.0 Added Files: jdom-1.0.jar Removed Files: jdom.jar Log Message: Renamed jdom.jar to jdom-1.0.jar --- jdom.jar DELETED --- --- NEW FILE: jdom-1.0.jar --- (This appears to be a binary file; contents omitted.) From jswordcvs at crosswire.org Sun Jan 30 11:26:07 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:08 2005 Subject: [jsword-svn] common s Message-ID: <200501301826.j0UIQ7uC015593@www.crosswire.org> Update of /cvs/jsword/common In directory www.crosswire.org:/tmp/cvs-serv15556 Modified Files: .classpath common.iml core.xml Log Message: Renamed jdom.jar to jdom-1.0.jar Index: core.xml =================================================================== RCS file: /cvs/jsword/common/core.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** core.xml 21 Sep 2004 17:45:47 -0000 1.16 --- core.xml 30 Jan 2005 18:26:05 -0000 1.17 *************** *** 33,37 **** =========================================================================--> ! --- 33,37 ---- =========================================================================--> ! Index: .classpath =================================================================== RCS file: /cvs/jsword/common/.classpath,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** .classpath 22 Sep 2004 15:50:00 -0000 1.9 --- .classpath 30 Jan 2005 18:26:05 -0000 1.10 *************** *** 10,16 **** - --- 10,16 ---- + Index: common.iml =================================================================== RCS file: /cvs/jsword/common/common.iml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** common.iml 28 Nov 2004 21:34:09 -0000 1.1 --- common.iml 30 Jan 2005 18:26:05 -0000 1.2 *************** *** 40,44 **** ! --- 40,44 ---- ! From jswordcvs at crosswire.org Sun Jan 30 11:26:07 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:08 2005 Subject: [jsword-svn] common/java/swing/org/crosswire/common/swing/desktop s Message-ID: <200501301826.j0UIQ7eZ015597@www.crosswire.org> Update of /cvs/jsword/common/java/swing/org/crosswire/common/swing/desktop In directory www.crosswire.org:/tmp/cvs-serv15556/java/swing/org/crosswire/common/swing/desktop Modified Files: LayoutType.java Log Message: Renamed jdom.jar to jdom-1.0.jar Index: LayoutType.java =================================================================== RCS file: /cvs/jsword/common/java/swing/org/crosswire/common/swing/desktop/LayoutType.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LayoutType.java 21 Sep 2004 17:45:47 -0000 1.2 --- LayoutType.java 30 Jan 2005 18:26:05 -0000 1.3 *************** *** 47,50 **** --- 47,55 ---- return new TDIViewLayout(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3257572784669800241L; }; *************** *** 61,64 **** --- 66,74 ---- return new MDIViewLayout(); } + + /** + * Serialization ID + */ + private static final long serialVersionUID = 3904681587101874488L; }; From jswordcvs at crosswire.org Sun Jan 30 11:26:10 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:11 2005 Subject: [jsword-svn] jsword-support/tools/findbugs-0.8.4 s Message-ID: <200501301826.j0UIQAxr015655@www.crosswire.org> Update of /cvs/jsword/jsword-support/tools/findbugs-0.8.4 In directory www.crosswire.org:/tmp/cvs-serv15621/tools/findbugs-0.8.4 Modified Files: build.xml Log Message: Renamed jdom.jar to jdom-1.0.jar Index: build.xml =================================================================== RCS file: /cvs/jsword/jsword-support/tools/findbugs-0.8.4/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.xml 26 Jan 2005 02:19:05 -0000 1.5 --- build.xml 30 Jan 2005 18:26:08 -0000 1.6 *************** *** 43,47 **** ! --- 43,47 ---- ! From jswordcvs at crosswire.org Sun Jan 30 11:26:13 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:15 2005 Subject: [jsword-svn] jsword/jar/lucene-1.4.1 s Message-ID: <200501301826.j0UIQDuT015684@www.crosswire.org> Update of /cvs/jsword/jsword/jar/lucene-1.4.1 In directory www.crosswire.org:/tmp/cvs-serv15675/jar/lucene-1.4.1 Removed Files: lucene-1.4.1.jar LICENSE.txt Log Message: Renamed jdom.jar to jdom-1.0.jar --- lucene-1.4.1.jar DELETED --- --- LICENSE.txt DELETED --- From jswordcvs at crosswire.org Sun Jan 30 11:26:14 2005 From: jswordcvs at crosswire.org (jswordcvs@crosswire.org) Date: Sun Jan 30 11:26:15 2005 Subject: [jsword-svn] jsword/jar/net-1.1.0 s Message-ID: <200501301826.j0UIQE2n015690@www.crosswire.org> Update of /cvs/jsword/jsword/jar/net-1.1.0 In directory www.crosswire.org:/tmp/cvs-serv15675/jar/net-1.1.0 Removed Files: LICENSE.txt commons-net-1.1.0.jar Log Message: Renamed jdom.jar to jdom-1.0.jar --- LICENSE.txt DELETED --- --- commons-net-1.1.0.jar DELETED ---