[jsword-svn]
jsword/java/limbo/org/crosswire/jsword/book/search/ser s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sun Oct 10 15:12:04 MST 2004
Update of /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser
In directory www.crosswire.org:/tmp/cvs-serv25203/java/limbo/org/crosswire/jsword/book/search/ser
Modified Files:
Msg.java SerIndexManager.java Msg.properties
Log Message:
basics of downloadable indexers
Index: Msg.properties
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser/Msg.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Msg.properties 9 Oct 2004 21:45:04 -0000 1.1
--- Msg.properties 10 Oct 2004 22:12:02 -0000 1.2
***************
*** 13,14 ****
--- 13,15 ----
SerIndex.WritingWords=Writing Words ({0})
SerIndex.Saving=Saving Index
+ SerIndex.InstallFailed=Installation failed
Index: Msg.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser/Msg.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Msg.java 9 Oct 2004 21:45:04 -0000 1.1
--- Msg.java 10 Oct 2004 22:12:02 -0000 1.2
***************
*** 36,39 ****
--- 36,40 ----
static final Msg WRITING_WORDS = new Msg("SerIndex.WritingWords"); //$NON-NLS-1$
static final Msg SAVING = new Msg("SerIndex.Saving"); //$NON-NLS-1$
+ static final Msg INSTALL_FAIL = new Msg("SerIndex.InstallFailed"); //$NON-NLS-1$
/**
Index: SerIndexManager.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/search/ser/SerIndexManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SerIndexManager.java 9 Oct 2004 21:45:04 -0000 1.1
--- SerIndexManager.java 10 Oct 2004 22:12:02 -0000 1.2
***************
*** 1,4 ****
--- 1,5 ----
package org.crosswire.jsword.book.search.ser;
+ import java.io.File;
import java.io.IOException;
import java.net.URL;
***************
*** 6,9 ****
--- 7,11 ----
import java.util.Map;
+ import org.crosswire.common.util.IOUtil;
import org.crosswire.common.util.Logger;
import org.crosswire.common.util.NetUtil;
***************
*** 16,20 ****
/**
! * .
*
* <p><table border='1' cellPadding='3' cellSpacing='0'>
--- 18,22 ----
/**
! * An implementation of IndexManager that controls Ser indexes.
*
* <p><table border='1' cellPadding='3' cellSpacing='0'>
***************
*** 107,110 ****
--- 109,129 ----
/* (non-Javadoc)
+ * @see org.crosswire.jsword.book.search.IndexManager#installDownloadedIndex(org.crosswire.jsword.book.Book, java.net.URL)
+ */
+ public void installDownloadedIndex(Book book, URL tempDest) throws BookException
+ {
+ try
+ {
+ URL storage = getStorageArea(book);
+ File zip = NetUtil.getAsFile(storage);
+ IOUtil.unpackZip(zip, storage);
+ }
+ catch (IOException ex)
+ {
+ throw new BookException(Msg.INSTALL_FAIL, ex);
+ }
+ }
+
+ /* (non-Javadoc)
* @see org.crosswire.jsword.book.search.IndexManager#deleteIndex(org.crosswire.jsword.book.Book)
*/
More information about the jsword-svn
mailing list