[jsword-svn] r978 - in
trunk/jsword/src/main/java/org/crosswire/jsword/book: . index search
dmsmith at crosswire.org
dmsmith at crosswire.org
Mon Jan 23 11:52:04 MST 2006
Author: dmsmith
Date: 2006-01-23 11:51:45 -0700 (Mon, 23 Jan 2006)
New Revision: 978
Added:
trunk/jsword/src/main/java/org/crosswire/jsword/book/index/Index.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.properties
trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManagerFactory.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexStatus.java
Removed:
trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.properties
trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java
Log:
new home for index
Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java 2006-01-23 18:49:45 UTC (rev 977)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -1,146 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- * http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- * Free Software Foundation, Inc.
- * 59 Temple Place - Suite 330
- * Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- * The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.jsword.book;
-
-import java.io.Serializable;
-
-/**
- * An Enumeration of the possible types of Book.
- *
- * <p>NOTE(joe): consider giving each a number (1,2,4,8) and allowing combinations
- *
- * @see gnu.lgpl.License for license details.
- * The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
- */
-public final class IndexStatus implements Serializable
-{
- /**
- * There is a complete and ready to use search index
- */
- public static final IndexStatus DONE = new IndexStatus("Indexed"); //$NON-NLS-1$
-
- /**
- * There is no search index, and no plans to create one
- */
- public static final IndexStatus UNDONE = new IndexStatus("No Index"); //$NON-NLS-1$
-
- /**
- * This Book has been scheduled for index creation
- */
- public static final IndexStatus SCHEDULED = new IndexStatus("Scheduled"); //$NON-NLS-1$
-
- /**
- * An index is currently being generated for this Book
- */
- public static final IndexStatus CREATING = new IndexStatus("Creating"); //$NON-NLS-1$
-
- /**
- * All the known values
- */
- private static final IndexStatus[] VALUES =
- {
- DONE,
- UNDONE,
- SCHEDULED,
- CREATING,
- };
-
- /**
- * @param name The name of the BookCategory
- */
- private IndexStatus(String name)
- {
- this.name = name;
- }
-
- /**
- * Lookup method to convert from a String
- */
- public static IndexStatus fromString(String name)
- {
- for (int i = 0; i < VALUES.length; i++)
- {
- IndexStatus o = VALUES[i];
- if (o.name.equalsIgnoreCase(name))
- {
- return o;
- }
- }
- // cannot get here
- assert false;
- return null;
- }
-
- /**
- * Lookup method to convert from an integer
- */
- public static IndexStatus fromInteger(int i)
- {
- return VALUES[i];
- }
-
- /**
- * Prevent subclasses from overriding canonical identity based Object methods
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object o)
- {
- return super.equals(o);
- }
-
- /**
- * Prevent subclasses from overriding canonical identity based Object methods
- * @see java.lang.Object#hashCode()
- */
- public int hashCode()
- {
- return super.hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString()
- {
- return name;
- }
-
- /**
- * The name of the BookCategory
- */
- private String name;
-
- // Support for serialization
- private static int nextObj;
- private final int obj = nextObj++;
-
- Object readResolve()
- {
- return VALUES[obj];
- }
-
- /**
- * Serialization ID
- */
- private static final long serialVersionUID = 3256718472791537204L;
-}
Copied: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/Index.java (from rev 967, trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java 2006-01-23 02:26:26 UTC (rev 967)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/index/Index.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -0,0 +1,73 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.jsword.book.index;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.book.search.SearchModifier;
+import org.crosswire.jsword.passage.Key;
+import org.crosswire.jsword.passage.NoSuchKeyException;
+
+/**
+ * An index into a body of text that knows what words exist and where they are.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public interface Index
+{
+ /**
+ * Find the set of references that satisfy the query. Query is anything that
+ * the underlying index can handle.
+ * If the <code>query</code> being searched for is null then an empty Key
+ * <b>MUST</b> be returned. Users of this index may use this functionality
+ * to get empty KeyLists which they then use to aggregate other searches
+ * done on this index.
+ * @param query The text to search for
+ * @return The references to the word
+ */
+ Key find(String query) throws BookException;
+
+ /**
+ * An index must be able to create KeyLists for users in a similar way to
+ * the Book that it is indexing.
+ * @param name The string to convert to a Key
+ * @return A new Key representing the given string, if possible
+ * @throws NoSuchKeyException If the string can not be turned into a Key
+ * @see org.crosswire.jsword.passage.KeyFactory#getKey(String)
+ */
+ Key getKey(String name) throws NoSuchKeyException;
+
+ /**
+ * Set any modifier for the current and subsequent search.
+ * Using null will clear the search modifier.
+ *
+ * @param modifier how to modify the search and its results.
+ */
+ void setSearchModifier(SearchModifier modifier);
+
+ /**
+ * Get the current SearchModifier. If there is none then return null.
+ * @return the current search modifier, or null if there is not one.
+ */
+ SearchModifier getSearchModifier();
+}
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/Index.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.java (from rev 967, trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java 2006-01-23 02:26:26 UTC (rev 967)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -0,0 +1,67 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.jsword.book.index;
+
+import java.net.URL;
+
+import org.crosswire.jsword.book.Book;
+import org.crosswire.jsword.book.BookException;
+
+/**
+ * A way of managing a way of creating a search index for a book.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public interface IndexManager
+{
+ /**
+ * Detects if index data has been stored for this Bible already
+ */
+ boolean isIndexed(Book book);
+
+ /**
+ * Create a new Searcher.
+ */
+ Index getIndex(Book book) throws BookException;
+
+ /**
+ * Read from the given source version to generate ourselves. On completion
+ * of this method the index should be usable.
+ */
+ void scheduleIndexCreation(Book book);
+
+ /**
+ * We have downloaded a search index to a zip file. It should be installed
+ * from here.
+ * @param book The book that we downloaded an index for
+ * @param tempDest The URL of a zip file to install
+ */
+ void installDownloadedIndex(Book book, URL tempDest) throws BookException;
+
+ /**
+ * Tidy up after yourself and remove all the files that make up any indexes
+ * you created.
+ */
+ void deleteIndex(Book book) throws BookException;
+}
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.properties (from rev 967, trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.properties)
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManager.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManagerFactory.java (from rev 967, trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java 2006-01-23 02:26:26 UTC (rev 967)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManagerFactory.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -0,0 +1,77 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.jsword.book.index;
+
+import org.crosswire.common.util.ClassUtil;
+import org.crosswire.common.util.Logger;
+
+/**
+ * A Factory class for IndexManagers.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+
+ */
+public final class IndexManagerFactory
+{
+ /**
+ * Prevent Instansiation
+ */
+ private IndexManagerFactory()
+ {
+ }
+
+ /**
+ * Create a new IndexManager.
+ */
+ public static IndexManager getIndexManager()
+ {
+ return instance;
+ }
+
+ /**
+ * The singleton
+ */
+ private static IndexManager instance;
+
+ /**
+ * The log stream
+ */
+ private static final Logger log = Logger.getLogger(IndexManagerFactory.class);
+
+ /**
+ * Setup the instance
+ */
+ static
+ {
+ try
+ {
+ Class impl = ClassUtil.getImplementor(IndexManager.class);
+ instance = (IndexManager) impl.newInstance();
+ }
+ catch (Exception ex)
+ {
+ log.error("createIndexManager failed", ex); //$NON-NLS-1$
+ }
+ }
+}
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexManagerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexStatus.java (from rev 967, trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/IndexStatus.java 2006-01-23 02:26:26 UTC (rev 967)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexStatus.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -0,0 +1,146 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.jsword.book.index;
+
+import java.io.Serializable;
+
+/**
+ * An Enumeration of the possible types of Book.
+ *
+ * <p>NOTE(joe): consider giving each a number (1,2,4,8) and allowing combinations
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public final class IndexStatus implements Serializable
+{
+ /**
+ * There is a complete and ready to use search index
+ */
+ public static final IndexStatus DONE = new IndexStatus("Indexed"); //$NON-NLS-1$
+
+ /**
+ * There is no search index, and no plans to create one
+ */
+ public static final IndexStatus UNDONE = new IndexStatus("No Index"); //$NON-NLS-1$
+
+ /**
+ * This Book has been scheduled for index creation
+ */
+ public static final IndexStatus SCHEDULED = new IndexStatus("Scheduled"); //$NON-NLS-1$
+
+ /**
+ * An index is currently being generated for this Book
+ */
+ public static final IndexStatus CREATING = new IndexStatus("Creating"); //$NON-NLS-1$
+
+ /**
+ * All the known values
+ */
+ private static final IndexStatus[] VALUES =
+ {
+ DONE,
+ UNDONE,
+ SCHEDULED,
+ CREATING,
+ };
+
+ /**
+ * @param name The name of the BookCategory
+ */
+ private IndexStatus(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Lookup method to convert from a String
+ */
+ public static IndexStatus fromString(String name)
+ {
+ for (int i = 0; i < VALUES.length; i++)
+ {
+ IndexStatus o = VALUES[i];
+ if (o.name.equalsIgnoreCase(name))
+ {
+ return o;
+ }
+ }
+ // cannot get here
+ assert false;
+ return null;
+ }
+
+ /**
+ * Lookup method to convert from an integer
+ */
+ public static IndexStatus fromInteger(int i)
+ {
+ return VALUES[i];
+ }
+
+ /**
+ * Prevent subclasses from overriding canonical identity based Object methods
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object o)
+ {
+ return super.equals(o);
+ }
+
+ /**
+ * Prevent subclasses from overriding canonical identity based Object methods
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode()
+ {
+ return super.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return name;
+ }
+
+ /**
+ * The name of the BookCategory
+ */
+ private String name;
+
+ // Support for serialization
+ private static int nextObj;
+ private final int obj = nextObj++;
+
+ Object readResolve()
+ {
+ return VALUES[obj];
+ }
+
+ /**
+ * Serialization ID
+ */
+ private static final long serialVersionUID = 3256718472791537204L;
+}
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/book/index/IndexStatus.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java 2006-01-23 18:49:45 UTC (rev 977)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/search/Index.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -1,72 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- * http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- * Free Software Foundation, Inc.
- * 59 Temple Place - Suite 330
- * Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- * The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.jsword.book.search;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.passage.Key;
-import org.crosswire.jsword.passage.NoSuchKeyException;
-
-/**
- * An index into a body of text that knows what words exist and where they are.
- *
- * @see gnu.lgpl.License for license details.
- * The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
- */
-public interface Index
-{
- /**
- * Find the set of references that satisfy the query. Query is anything that
- * the underlying index can handle.
- * If the <code>query</code> being searched for is null then an empty Key
- * <b>MUST</b> be returned. Users of this index may use this functionality
- * to get empty KeyLists which they then use to aggregate other searches
- * done on this index.
- * @param query The text to search for
- * @return The references to the word
- */
- Key find(String query) throws BookException;
-
- /**
- * An index must be able to create KeyLists for users in a similar way to
- * the Book that it is indexing.
- * @param name The string to convert to a Key
- * @return A new Key representing the given string, if possible
- * @throws NoSuchKeyException If the string can not be turned into a Key
- * @see org.crosswire.jsword.passage.KeyFactory#getKey(String)
- */
- Key getKey(String name) throws NoSuchKeyException;
-
- /**
- * Set any modifier for the current and subsequent search.
- * Using null will clear the search modifier.
- *
- * @param modifier how to modify the search and its results.
- */
- void setSearchModifier(SearchModifier modifier);
-
- /**
- * Get the current SearchModifier. If there is none then return null.
- * @return the current search modifier, or null if there is not one.
- */
- SearchModifier getSearchModifier();
-}
Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java 2006-01-23 18:49:45 UTC (rev 977)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -1,67 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- * http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- * Free Software Foundation, Inc.
- * 59 Temple Place - Suite 330
- * Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- * The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.jsword.book.search;
-
-import java.net.URL;
-
-import org.crosswire.jsword.book.Book;
-import org.crosswire.jsword.book.BookException;
-
-/**
- * A way of managing a way of creating a search index for a book.
- *
- * @see gnu.lgpl.License for license details.
- * The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
- */
-public interface IndexManager
-{
- /**
- * Detects if index data has been stored for this Bible already
- */
- boolean isIndexed(Book book);
-
- /**
- * Create a new Searcher.
- */
- Index getIndex(Book book) throws BookException;
-
- /**
- * Read from the given source version to generate ourselves. On completion
- * of this method the index should be usable.
- */
- void scheduleIndexCreation(Book book);
-
- /**
- * We have downloaded a search index to a zip file. It should be installed
- * from here.
- * @param book The book that we downloaded an index for
- * @param tempDest The URL of a zip file to install
- */
- void installDownloadedIndex(Book book, URL tempDest) throws BookException;
-
- /**
- * Tidy up after yourself and remove all the files that make up any indexes
- * you created.
- */
- void deleteIndex(Book book) throws BookException;
-}
Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.properties 2006-01-23 18:49:45 UTC (rev 977)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManager.properties 2006-01-23 18:51:45 UTC (rev 978)
@@ -1,2 +0,0 @@
-
-default=org.crosswire.jsword.book.search.lucene.LuceneIndexManager
Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java 2006-01-23 18:49:45 UTC (rev 977)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/search/IndexManagerFactory.java 2006-01-23 18:51:45 UTC (rev 978)
@@ -1,77 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- * http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- * Free Software Foundation, Inc.
- * 59 Temple Place - Suite 330
- * Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- * The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.jsword.book.search;
-
-import org.crosswire.common.util.ClassUtil;
-import org.crosswire.common.util.Logger;
-
-/**
- * A Factory class for IndexManagers.
- *
- * @see gnu.lgpl.License for license details.
- * The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
-
- */
-public final class IndexManagerFactory
-{
- /**
- * Prevent Instansiation
- */
- private IndexManagerFactory()
- {
- }
-
- /**
- * Create a new IndexManager.
- */
- public static IndexManager getIndexManager()
- {
- return instance;
- }
-
- /**
- * The singleton
- */
- private static IndexManager instance;
-
- /**
- * The log stream
- */
- private static final Logger log = Logger.getLogger(IndexManagerFactory.class);
-
- /**
- * Setup the instance
- */
- static
- {
- try
- {
- Class impl = ClassUtil.getImplementor(IndexManager.class);
- instance = (IndexManager) impl.newInstance();
- }
- catch (Exception ex)
- {
- log.error("createIndexManager failed", ex); //$NON-NLS-1$
- }
- }
-}
More information about the jsword-svn
mailing list