[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/sword s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sun May 8 18:29:08 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword
In directory www.crosswire.org:/tmp/cvs-serv6194/java/jsword/org/crosswire/jsword/book/sword
Modified Files:
GZIPBackend.java SwordBookDriver.java SwordDictionary.java
SwordBook.java ZLDBackend.java RawBackend.java ModuleType.java
ConfigEntryTable.java RawLDBackend.java CompressionType.java
LZSSBackend.java
Added Files:
AbstractBackend.java
Removed Files:
Backend.java
Log Message:
Moved unused code to limbo.
Upgraded support-tools: checkstyle, pmd and findbugs to most recent.
Addressed over 100 issues reported by findbugs and checkstyle.
Resulted in major refactoring of GBFFilter.
Net result is that code size is significantly smaller.
Index: ModuleType.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ModuleType.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ModuleType.java 19 Mar 2005 01:56:47 -0000 1.16
--- ModuleType.java 9 May 2005 01:29:06 -0000 1.17
***************
*** 40,49 ****
public static final ModuleType RAW_TEXT = new ModuleType("RawText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
--- 40,49 ----
public static final ModuleType RAW_TEXT = new ModuleType("RawText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
***************
*** 61,70 ****
public static final ModuleType Z_TEXT = new ModuleType("zText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return getCompressedBackend(sbmd, rootPath);
--- 61,70 ----
public static final ModuleType Z_TEXT = new ModuleType("zText", BookType.BIBLE) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return getCompressedBackend(sbmd, rootPath);
***************
*** 87,96 ****
public static final ModuleType RAW_COM = new ModuleType("RawCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
--- 87,96 ----
public static final ModuleType RAW_COM = new ModuleType("RawCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
***************
*** 108,117 ****
public static final ModuleType Z_COM = new ModuleType("zCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return getCompressedBackend(sbmd, rootPath);
--- 108,117 ----
public static final ModuleType Z_COM = new ModuleType("zCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return getCompressedBackend(sbmd, rootPath);
***************
*** 134,143 ****
public static final ModuleType HREF_COM = new ModuleType("HREFCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
--- 134,143 ----
public static final ModuleType HREF_COM = new ModuleType("HREFCom", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
***************
*** 155,164 ****
public static final ModuleType RAW_FILES = new ModuleType("RawFiles", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
--- 155,164 ----
public static final ModuleType RAW_FILES = new ModuleType("RawFiles", BookType.COMMENTARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
***************
*** 176,185 ****
public static final ModuleType RAW_LD = new ModuleType("RawLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawLDBackend(sbmd, rootPath, 2);
--- 176,185 ----
public static final ModuleType RAW_LD = new ModuleType("RawLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawLDBackend(sbmd, rootPath, 2);
***************
*** 197,206 ****
public static final ModuleType RAW_LD4 = new ModuleType("RawLD4", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawLDBackend(sbmd, rootPath, 4);
--- 197,206 ----
public static final ModuleType RAW_LD4 = new ModuleType("RawLD4", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawLDBackend(sbmd, rootPath, 4);
***************
*** 218,227 ****
public static final ModuleType Z_LD = new ModuleType("zLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new ZLDBackend(sbmd, rootPath);
--- 218,227 ----
public static final ModuleType Z_LD = new ModuleType("zLD", BookType.DICTIONARY) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordDictionary(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new ZLDBackend(sbmd, rootPath);
***************
*** 244,253 ****
public static final ModuleType RAW_GEN_BOOK = new ModuleType("RawGenBook", null) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, Backend backend)
{
return new SwordBook(sbmd, backend);
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
--- 244,253 ----
public static final ModuleType RAW_GEN_BOOK = new ModuleType("RawGenBook", null) //$NON-NLS-1$ //$NON-NLS-2$
{
! protected Book getBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
return new SwordBook(sbmd, backend);
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new RawBackend(sbmd, rootPath);
***************
*** 322,326 ****
public Book createBook(SwordBookMetaData sbmd, File progdir) throws BookException
{
! Backend backend = getBackend(sbmd, progdir);
Book book = getBook(sbmd, backend);
return book;
--- 322,326 ----
public Book createBook(SwordBookMetaData sbmd, File progdir) throws BookException
{
! AbstractBackend backend = getBackend(sbmd, progdir);
Book book = getBook(sbmd, backend);
return book;
***************
*** 330,344 ****
* Create a Book with the given backend
*/
! protected abstract Book getBook(SwordBookMetaData sbmd, Backend backend);
/**
* Create a the appropriate backend for this type of book
*/
! protected abstract Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException;
/**
*
*/
! protected static Backend getCompressedBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
String cStr = sbmd.getProperty(ConfigEntryType.COMPRESS_TYPE);
--- 330,344 ----
* Create a Book with the given backend
*/
! protected abstract Book getBook(SwordBookMetaData sbmd, AbstractBackend backend);
/**
* Create a the appropriate backend for this type of book
*/
! protected abstract AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException;
/**
*
*/
! protected static AbstractBackend getCompressedBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
String cStr = sbmd.getProperty(ConfigEntryType.COMPRESS_TYPE);
Index: RawBackend.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/RawBackend.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** RawBackend.java 18 Apr 2005 22:10:38 -0000 1.23
--- RawBackend.java 9 May 2005 01:29:06 -0000 1.24
***************
*** 40,44 ****
* @version $Id$
*/
! public class RawBackend extends Backend
{
/**
--- 40,44 ----
* @version $Id$
*/
! public class RawBackend extends AbstractBackend
{
/**
***************
*** 121,125 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
--- 121,125 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
***************
*** 173,177 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#readIndex()
*/
public Key readIndex()
--- 173,177 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#readIndex()
*/
public Key readIndex()
***************
*** 182,186 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#isSupported()
*/
public boolean isSupported()
--- 182,186 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#isSupported()
*/
public boolean isSupported()
Index: SwordDictionary.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/SwordDictionary.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** SwordDictionary.java 21 Mar 2005 02:37:28 -0000 1.40
--- SwordDictionary.java 9 May 2005 01:29:06 -0000 1.41
***************
*** 51,55 ****
* (i.e. actually reading the indexes)
*/
! protected SwordDictionary(SwordBookMetaData sbmd, Backend backend)
{
setBookMetaData(sbmd);
--- 51,55 ----
* (i.e. actually reading the indexes)
*/
! protected SwordDictionary(SwordBookMetaData sbmd, AbstractBackend backend)
{
setBookMetaData(sbmd);
***************
*** 297,301 ****
* To read the data from the disk
*/
! private Backend backend;
/**
--- 297,301 ----
* To read the data from the disk
*/
! private AbstractBackend backend;
/**
--- NEW FILE: AbstractBackend.java ---
package org.crosswire.jsword.book.sword;
import java.io.File;
import org.crosswire.common.activate.Activatable;
import org.crosswire.common.crypt.Sapphire;
import org.crosswire.jsword.book.BookException;
import org.crosswire.jsword.passage.Key;
/**
* A generic way to read data from disk for later formatting.
*
* <p><table border='1' cellPadding='3' cellSpacing='0'>
* <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
*
* Distribution Licence:<br />
* 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.<br />
* 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.<br />
* The License is available on the internet
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA<br />
* The copyright to this program is held by it's authors.
* </font></td></tr></table>
* @see gnu.gpl.Licence
* @author Joe Walker [joe at eireneh dot com]
* @version $Id: AbstractBackend.java,v 1.1 2005/05/09 01:29:06 dmsmith Exp $
*/
public abstract class AbstractBackend implements Activatable
{
/**
* Construct a minimal backend
* @param sbmd
* @param location
*/
public AbstractBackend(SwordBookMetaData sbmd, File location)
{
bmd = sbmd;
rootPath = location;
}
/**
* @return Returns the root path.
*/
public File getRootPath()
{
return rootPath;
}
/**
* @return Returns the Sword BookMetaData.
*/
public SwordBookMetaData getBookMetaData()
{
return bmd;
}
/**
* Decipher the data in place, if it is enciphered and there
* is a key to unlock it.
* @param data the data to unlock
*/
public void decipher(byte[] data)
{
String cipherKeyString = getBookMetaData().getProperty(ConfigEntryType.CIPHER_KEY);
if (cipherKeyString != null)
{
Sapphire cipherEngine = new Sapphire(cipherKeyString.getBytes());
for (int i = 0; i < data.length; i++)
{
data[i] = cipherEngine.cipher(data[i]);
}
}
}
/**
* Initialise a AbstractBackend before use. This method needs to call addKey() a
* number of times on SwordDictionary
*/
public abstract Key readIndex();
/**
* Get the bytes alotted for the given verse
* @param key The key to fetch
* @return String The data for the verse in question
* @throws BookException If the data can not be read.
*/
public abstract String getRawText(Key key) throws BookException;
/**
* Returns whether this AbstractBackend is implemented.
* @return true if this AbstractBackend is implemented.
*/
public abstract boolean isSupported();
private SwordBookMetaData bmd;
private File rootPath;
}
Index: ConfigEntryTable.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ConfigEntryTable.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ConfigEntryTable.java 21 Mar 2005 02:37:28 -0000 1.4
--- ConfigEntryTable.java 9 May 2005 01:29:06 -0000 1.5
***************
*** 313,327 ****
// Get the next non-blank, non-comment line
for (String line = bin.readLine(); line != null; line = bin.readLine())
{
// Remove trailing whitespace
! line = line.trim();
! int length = line.length();
// skip blank and comment lines
! if (length != 0 && line.charAt(0) != '#')
{
! return line;
}
}
--- 313,328 ----
// Get the next non-blank, non-comment line
+ String trimmed = null;
for (String line = bin.readLine(); line != null; line = bin.readLine())
{
// Remove trailing whitespace
! trimmed = line.trim();
! int length = trimmed.length();
// skip blank and comment lines
! if (length != 0 && trimmed.charAt(0) != '#')
{
! return trimmed;
}
}
--- Backend.java DELETED ---
Index: SwordBookDriver.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/SwordBookDriver.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** SwordBookDriver.java 23 Mar 2005 02:05:38 -0000 1.39
--- SwordBookDriver.java 9 May 2005 01:29:06 -0000 1.40
***************
*** 272,276 ****
if (Arrays.equals(files, SwordBookDriver.dirs))
{
! return null;
}
--- 272,276 ----
if (Arrays.equals(files, SwordBookDriver.dirs))
{
! return EMPTY_FILE_ARRAY;
}
***************
*** 428,431 ****
--- 428,436 ----
/**
+ * An empty immutable <code>Rile</code> array.
+ */
+ public static final File[] EMPTY_FILE_ARRAY = new File[0];
+
+ /**
* Default windows installation directory
*/
Index: ZLDBackend.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/ZLDBackend.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ZLDBackend.java 4 Mar 2005 04:04:47 -0000 1.8
--- ZLDBackend.java 9 May 2005 01:29:06 -0000 1.9
***************
*** 33,37 ****
* @version $Id$
*/
! public class ZLDBackend extends Backend
{
/**
--- 33,37 ----
* @version $Id$
*/
! public class ZLDBackend extends AbstractBackend
{
/**
***************
*** 66,70 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
--- 66,70 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
***************
*** 75,79 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#isSupported()
*/
public boolean isSupported()
--- 75,79 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#isSupported()
*/
public boolean isSupported()
Index: SwordBook.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/SwordBook.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** SwordBook.java 19 Mar 2005 01:56:47 -0000 1.16
--- SwordBook.java 9 May 2005 01:29:06 -0000 1.17
***************
*** 8,12 ****
import org.crosswire.jsword.book.BookException;
import org.crosswire.jsword.book.OSISUtil;
! import org.crosswire.jsword.book.basic.PassageAbstractBook;
import org.crosswire.jsword.book.filter.Filter;
import org.crosswire.jsword.passage.Key;
--- 8,12 ----
import org.crosswire.jsword.book.BookException;
import org.crosswire.jsword.book.OSISUtil;
! import org.crosswire.jsword.book.basic.AbstractPassageBook;
import org.crosswire.jsword.book.filter.Filter;
import org.crosswire.jsword.passage.Key;
***************
*** 38,47 ****
* @version $Id$
*/
! public class SwordBook extends PassageAbstractBook
{
/**
* Simple ctor
*/
! public SwordBook(SwordBookMetaData sbmd, Backend backend)
{
setBookMetaData(sbmd);
--- 38,47 ----
* @version $Id$
*/
! public class SwordBook extends AbstractPassageBook
{
/**
* Simple ctor
*/
! public SwordBook(SwordBookMetaData sbmd, AbstractBackend backend)
{
setBookMetaData(sbmd);
***************
*** 89,93 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.PassageAbstractBook#addOSIS(org.crosswire.jsword.passage.Key, org.jdom.Element, java.util.List)
*/
public void addOSIS(Key key, Element div, List osisContent)
--- 89,93 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.AbstractPassageBook#addOSIS(org.crosswire.jsword.passage.Key, org.jdom.Element, java.util.List)
*/
public void addOSIS(Key key, Element div, List osisContent)
***************
*** 119,123 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.PassageAbstractBook#setText(org.crosswire.jsword.passage.Verse, java.lang.String)
*/
protected void setText(Verse verse, String text) throws BookException
--- 119,123 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.AbstractPassageBook#setText(org.crosswire.jsword.passage.Verse, java.lang.String)
*/
protected void setText(Verse verse, String text) throws BookException
***************
*** 127,131 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.PassageAbstractBook#getFilter()
*/
protected Filter getFilter()
--- 127,131 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.basic.AbstractPassageBook#getFilter()
*/
protected Filter getFilter()
***************
*** 137,141 ****
* To read the data from the disk
*/
! private Backend backend;
/**
--- 137,141 ----
* To read the data from the disk
*/
! private AbstractBackend backend;
/**
Index: RawLDBackend.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/RawLDBackend.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** RawLDBackend.java 18 Apr 2005 22:10:38 -0000 1.17
--- RawLDBackend.java 9 May 2005 01:29:06 -0000 1.18
***************
*** 41,45 ****
* @version $Id$
*/
! public class RawLDBackend extends Backend
{
/**
--- 41,45 ----
* @version $Id$
*/
! public class RawLDBackend extends AbstractBackend
{
/**
***************
*** 196,200 ****
/*
* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
--- 196,200 ----
/*
* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
***************
*** 234,238 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#isSupported()
*/
public boolean isSupported()
--- 234,238 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#isSupported()
*/
public boolean isSupported()
Index: CompressionType.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/CompressionType.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CompressionType.java 4 Mar 2005 04:04:47 -0000 1.6
--- CompressionType.java 9 May 2005 01:29:06 -0000 1.7
***************
*** 42,46 ****
return true;
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
BlockType blockType = BlockType.fromString(sbmd.getProperty(ConfigEntryType.BLOCK_TYPE));
--- 42,46 ----
return true;
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
BlockType blockType = BlockType.fromString(sbmd.getProperty(ConfigEntryType.BLOCK_TYPE));
***************
*** 63,67 ****
return false;
}
! protected Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new LZSSBackend(sbmd, rootPath);
--- 63,67 ----
return false;
}
! protected AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
{
return new LZSSBackend(sbmd, rootPath);
***************
*** 89,93 ****
abstract boolean isSupported();
! abstract Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException;
/**
--- 89,93 ----
abstract boolean isSupported();
! abstract AbstractBackend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException;
/**
Index: GZIPBackend.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/GZIPBackend.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** GZIPBackend.java 18 Apr 2005 22:10:38 -0000 1.31
--- GZIPBackend.java 9 May 2005 01:29:06 -0000 1.32
***************
*** 88,92 ****
* @version $Id$
*/
! public class GZIPBackend extends Backend
{
private static final String SUFFIX_COMP = "v"; //$NON-NLS-1$
--- 88,92 ----
* @version $Id$
*/
! public class GZIPBackend extends AbstractBackend
{
private static final String SUFFIX_COMP = "v"; //$NON-NLS-1$
***************
*** 207,211 ****
/*
* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
--- 207,211 ----
/*
* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
***************
*** 318,322 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#readIndex()
*/
public Key readIndex()
--- 318,322 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#readIndex()
*/
public Key readIndex()
***************
*** 327,331 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#isSupported()
*/
public boolean isSupported()
--- 327,331 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#isSupported()
*/
public boolean isSupported()
Index: LZSSBackend.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/sword/LZSSBackend.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** LZSSBackend.java 4 Mar 2005 04:04:47 -0000 1.12
--- LZSSBackend.java 9 May 2005 01:29:06 -0000 1.13
***************
*** 31,35 ****
* @version $Id$
*/
! public class LZSSBackend extends Backend
{
/**
--- 31,35 ----
* @version $Id$
*/
! public class LZSSBackend extends AbstractBackend
{
/**
***************
*** 56,60 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
--- 56,60 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key, java.lang.String)
*/
public String getRawText(Key key) throws BookException
***************
*** 65,69 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#readIndex()
*/
public Key readIndex()
--- 65,69 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#readIndex()
*/
public Key readIndex()
***************
*** 74,78 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.Backend#isSupported()
*/
public boolean isSupported()
--- 74,78 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.sword.AbstractBackend#isSupported()
*/
public boolean isSupported()
More information about the jsword-svn
mailing list