[jsword-svn] r987 - in trunk/jsword/src/main/java/org/crosswire/jsword: book/basic examples index index/basic index/lucene index/query index/query/basic index/search index/search/basic

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Jan 23 12:27:23 MST 2006


Author: dmsmith
Date: 2006-01-23 12:26:33 -0700 (Mon, 23 Jan 2006)
New Revision: 987

Added:
   trunk/jsword/src/main/java/org/crosswire/jsword/index/AbstractIndex.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractBinaryQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndNotQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BaseQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BlurQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/Msg.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/Msg.properties
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/NullQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/OrQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/RangeQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java
Removed:
   trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.properties
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java
Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java
   trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneQueryBuilder.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneSearcher.java
Log:
new home for index interface

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -32,10 +32,10 @@
 import org.crosswire.jsword.book.FeatureType;
 import org.crosswire.jsword.index.IndexStatus;
 import org.crosswire.jsword.index.IndexStatusListener;
+import org.crosswire.jsword.index.search.DefaultSearchRequest;
 import org.crosswire.jsword.index.search.SearchRequest;
 import org.crosswire.jsword.index.search.Searcher;
 import org.crosswire.jsword.index.search.SearcherFactory;
-import org.crosswire.jsword.index.search.basic.DefaultSearchRequest;
 import org.crosswire.jsword.passage.Key;
 import org.jdom.Document;
 

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -41,8 +41,8 @@
 import org.crosswire.jsword.book.Books;
 import org.crosswire.jsword.book.BooksEvent;
 import org.crosswire.jsword.book.BooksListener;
-import org.crosswire.jsword.index.search.basic.DefaultSearchModifier;
-import org.crosswire.jsword.index.search.basic.DefaultSearchRequest;
+import org.crosswire.jsword.index.search.DefaultSearchModifier;
+import org.crosswire.jsword.index.search.DefaultSearchRequest;
 import org.crosswire.jsword.passage.BibleInfo;
 import org.crosswire.jsword.passage.Key;
 import org.crosswire.jsword.passage.NoSuchKeyException;

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/AbstractIndex.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/AbstractIndex.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,58 @@
+/**
+ * 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:AbstractIndex.java 983 2006-01-23 14:10:49 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index;
+
+import org.crosswire.jsword.index.search.SearchModifier;
+
+/**
+ * A simple implementation of an Index that provides the
+ * set/get for SearchModifier.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at gmail dot com]
+ */
+
+public abstract class AbstractIndex implements Index
+{
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.Index#setSearchModifier(org.crosswire.jsword.index.search.SearchModifier)
+     */
+    public void setSearchModifier(SearchModifier theModifier)
+    {
+        modifier = theModifier;
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.Index#getSearchModifier()
+     */
+    public SearchModifier getSearchModifier()
+    {
+        return modifier;
+    }
+
+    /**
+     * How the search is to be modified.
+     */
+    private SearchModifier modifier;
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/AbstractIndex.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/basic/AbstractIndex.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,59 +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:AbstractIndex.java 983 2006-01-23 14:10:49 -0500 (Mon, 23 Jan 2006) dmsmith $
- */
-package org.crosswire.jsword.index.basic;
-
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.search.SearchModifier;
-
-/**
- * A simple implementation of an Index that provides the
- * set/get for SearchModifier.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at gmail dot com]
- */
-
-public abstract class AbstractIndex implements Index
-{
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.Index#setSearchModifier(org.crosswire.jsword.index.search.SearchModifier)
-     */
-    public void setSearchModifier(SearchModifier theModifier)
-    {
-        modifier = theModifier;
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.Index#getSearchModifier()
-     */
-    public SearchModifier getSearchModifier()
-    {
-        return modifier;
-    }
-
-    /**
-     * How the search is to be modified.
-     */
-    private SearchModifier modifier;
-}

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -17,7 +17,7 @@
  * Copyright: 2005
  *     The copyright to this program is held by it's authors.
  *
- * ID: $Id$
+ * ID: $Id:LuceneIndex.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
  */
 package org.crosswire.jsword.index.lucene;
 
@@ -50,8 +50,8 @@
 import org.crosswire.jsword.book.Book;
 import org.crosswire.jsword.book.BookData;
 import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.AbstractIndex;
 import org.crosswire.jsword.index.IndexStatus;
-import org.crosswire.jsword.index.basic.AbstractIndex;
 import org.crosswire.jsword.index.search.SearchModifier;
 import org.crosswire.jsword.passage.AbstractPassage;
 import org.crosswire.jsword.passage.BibleInfo;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneQueryBuilder.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneQueryBuilder.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneQueryBuilder.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -17,21 +17,21 @@
  * Copyright: 2005
  *     The copyright to this program is held by it's authors.
  *
- * ID: $Id$
+ * ID: $Id:LuceneQueryBuilder.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
  */
 package org.crosswire.jsword.index.lucene;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.crosswire.jsword.index.query.AndNotQuery;
+import org.crosswire.jsword.index.query.AndQuery;
+import org.crosswire.jsword.index.query.BaseQuery;
+import org.crosswire.jsword.index.query.BlurQuery;
+import org.crosswire.jsword.index.query.NullQuery;
 import org.crosswire.jsword.index.query.Query;
 import org.crosswire.jsword.index.query.QueryBuilder;
-import org.crosswire.jsword.index.query.basic.AndNotQuery;
-import org.crosswire.jsword.index.query.basic.AndQuery;
-import org.crosswire.jsword.index.query.basic.BaseQuery;
-import org.crosswire.jsword.index.query.basic.BlurQuery;
-import org.crosswire.jsword.index.query.basic.NullQuery;
-import org.crosswire.jsword.index.query.basic.RangeQuery;
+import org.crosswire.jsword.index.query.RangeQuery;
 
 /**
  * A query can have a optional range specifier and an optional blur specifier.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneSearcher.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneSearcher.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneSearcher.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -17,7 +17,7 @@
  * Copyright: 2005
  *     The copyright to this program is held by it's authors.
  *
- * ID: $Id$
+ * ID: $Id:LuceneSearcher.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
  */
 package org.crosswire.jsword.index.lucene;
 
@@ -25,9 +25,9 @@
 import org.crosswire.jsword.index.Index;
 import org.crosswire.jsword.index.query.Query;
 import org.crosswire.jsword.index.query.QueryBuilderFactory;
+import org.crosswire.jsword.index.search.DefaultSearchRequest;
 import org.crosswire.jsword.index.search.SearchRequest;
 import org.crosswire.jsword.index.search.Searcher;
-import org.crosswire.jsword.index.search.basic.DefaultSearchRequest;
 import org.crosswire.jsword.passage.Key;
 
 /**

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractBinaryQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractBinaryQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,64 @@
+/**
+ * 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:AbstractBinaryQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+
+/**
+ * A binary query has a left query and right query.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public abstract class AbstractBinaryQuery implements Query
+{
+    /**
+     * Create a query consisting of two queries.
+     * 
+     * @param theLeftQuery
+     * @param theRightQuery
+     */
+    public AbstractBinaryQuery(Query theLeftQuery, Query theRightQuery)
+    {
+        leftQuery = theLeftQuery;
+        rightQuery = theRightQuery;
+    }
+
+    /**
+     * @return Returns the leftQuery.
+     */
+    public Query getLeftQuery()
+    {
+        return leftQuery;
+    }
+
+    /**
+     * @return Returns the rightQuery.
+     */
+    public Query getRightQuery()
+    {
+        return rightQuery;
+    }
+
+    private Query leftQuery;
+    private Query rightQuery;
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractBinaryQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AbstractQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,54 @@
+/**
+ * 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: BaseQuery.java 763 2005-07-27 19:26:43 -0400 (Wed, 27 Jul 2005) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+
+/**
+ * A base query is the smallest unit of search that the index can perform.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public abstract class AbstractQuery implements Query
+{
+
+    /**
+     * Construct a query from a string.
+     * 
+     * @param theQuery
+     */
+    public AbstractQuery(String theQuery)
+    {
+        query = theQuery;
+    }
+
+    /**
+     * @return the query
+     */
+    public String getQuery()
+    {
+        return query;
+    }
+
+    private String query;
+}

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndNotQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndNotQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,74 @@
+/**
+ * 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:AndNotQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * An "And Not" query specifies that a result needs to be in the left
+ * but not in the right query result.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class AndNotQuery extends AbstractBinaryQuery
+{
+
+    /**
+     * Create a query where the right query result is subtracted from the left query result.
+     * 
+     * @param theLeftQuery
+     * @param theRightQuery
+     */
+    public AndNotQuery(Query theLeftQuery, Query theRightQuery)
+    {
+        super(theLeftQuery, theRightQuery);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        Key left = getLeftQuery().find(index);
+
+        if (left.isEmpty())
+        {
+            return left;
+        }
+
+        Key right = getRightQuery().find(index);
+
+        if (right.isEmpty())
+        {
+            return left;
+        }
+
+        left.removeAll(right);
+
+        return left;
+    }
+
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndNotQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,71 @@
+/**
+ * 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:AndQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * An AND query specifies that a result needs to be in both the left and the right query results.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class AndQuery extends AbstractBinaryQuery
+{
+
+    /**
+     * Create a query where the result is the intersection of two queries.
+     * 
+     * @param theLeftQuery
+     * @param theRightQuery
+     */
+    public AndQuery(Query theLeftQuery, Query theRightQuery)
+    {
+        super(theLeftQuery, theRightQuery);
+    }
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        Key left = getLeftQuery().find(index);
+
+        if (left.isEmpty())
+        {
+            return left;
+        }
+
+        Key right = getRightQuery().find(index);
+
+        if (right.isEmpty())
+        {
+            return right;
+        }
+
+        left.retainAll(right);
+
+        return left;
+    }
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/AndQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BaseQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BaseQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,55 @@
+/**
+ * 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:BaseQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * A base query is the smallest unit of search that the index can perform.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class BaseQuery extends AbstractQuery
+{
+
+    /**
+     * Construct a query from a string.
+     * 
+     * @param theQuery
+     */
+    public BaseQuery(String theQuery)
+    {
+        super(theQuery);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        return index.find(getQuery());
+    }
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BaseQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BlurQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BlurQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,87 @@
+/**
+ * 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:BlurQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+import org.crosswire.jsword.passage.RestrictionType;
+
+/**
+ * A blur query specifies how much to blur the results of the right query
+ * before ANDing it to the left.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class BlurQuery extends AbstractBinaryQuery
+{
+    /**
+     * Create a query that specifies how much to blur the results of the right query
+     * before ANDing it to the left.
+     * 
+     * @param theLeftQuery
+     * @param theRightQuery
+     */
+    public BlurQuery(Query theLeftQuery, Query theRightQuery, int theFactor)
+    {
+        super(theLeftQuery, theRightQuery);
+        factor = theFactor;
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        Key left = getLeftQuery().find(index);
+
+        if (left.isEmpty())
+        {
+            return left;
+        }
+
+        Key right = getRightQuery().find(index);
+
+        if (right.isEmpty())
+        {
+            return right;
+        }
+
+        right.blur(factor, RestrictionType.getDefaultBlurRestriction());
+
+        left.retainAll(right);
+
+        return left;
+    }
+
+    /**
+     * @return the blur factor
+     */
+    public int getFactor()
+    {
+        return factor;
+    }
+
+    private int factor;
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/BlurQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/Msg.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/Msg.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,44 @@
+/**
+ * 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: Msg.java 763 2005-07-27 23:26:43Z dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.common.util.MsgBase;
+
+/**
+ * Compile safe Msg resource settings.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+final class Msg extends MsgBase
+{
+    static final Msg ILLEGAL_PASSAGE = new Msg("RangeQuery.IllegalPassage"); //$NON-NLS-1$
+
+    /**
+     * Passthrough ctor
+     */
+    private Msg(String name)
+    {
+        super(name);
+    }
+}

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/Msg.properties (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.properties)

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/NullQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/NullQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,52 @@
+/**
+ * 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: OrQuery.java 964 2006-01-22 10:10:00 -0500 (Sun, 22 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * A null query searches for nothing and returns an empty Key.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class NullQuery implements Query
+{
+    /**
+     * Create a NullQuery.
+     */
+    public NullQuery()
+    {
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.query.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        return index.find(null);
+    }
+
+}

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/OrQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/OrQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,68 @@
+/**
+ * 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:OrQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * An OR query specifies that a result is the union of the left and the right query results.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [ dmsmith555 at yahoo dot com]
+ */
+public class OrQuery extends AbstractBinaryQuery
+{
+
+    /**
+     * 
+     */
+    public OrQuery(Query theLeftQuery, Query theRightQuery)
+    {
+        super(theLeftQuery, theRightQuery);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        Key left = getLeftQuery().find(index);
+        Key right = getRightQuery().find(index);
+
+        if (left.isEmpty())
+        {
+            return right;
+        }
+
+        if (right.isEmpty())
+        {
+            return left;
+        }
+
+        left.addAll(right);
+
+        return left;
+    }
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/OrQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/RangeQuery.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/RangeQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,65 @@
+/**
+ * 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:RangeQuery.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.query;
+
+import org.crosswire.jsword.book.BookException;
+import org.crosswire.jsword.index.Index;
+import org.crosswire.jsword.passage.Key;
+import org.crosswire.jsword.passage.NoSuchKeyException;
+
+/**
+ * A range query specifies how a range should be included in the search.
+ * It provides a range, a modifier (AND [+] or AND NOT [-]).
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [ dmsmith555 at yahoo dot com]
+ */
+public class RangeQuery extends AbstractQuery
+{
+
+    /**
+     * Construct a query from the range specification.
+     * 
+     * @param theRange
+     */
+    public RangeQuery(String theRange)
+    {
+        super(theRange);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
+     */
+    public Key find(Index index) throws BookException
+    {
+        String range = getQuery();
+        try
+        {
+            return index.getKey(range);
+        }
+        catch (NoSuchKeyException e)
+        {
+            throw new BookException(Msg.ILLEGAL_PASSAGE, e, new Object[] { range });
+        }
+    }
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/RangeQuery.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractBinaryQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,65 +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.index.query.basic;
-
-import org.crosswire.jsword.index.query.Query;
-
-/**
- * A binary query has a left query and right query.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public abstract class AbstractBinaryQuery implements Query
-{
-    /**
-     * Create a query consisting of two queries.
-     * 
-     * @param theLeftQuery
-     * @param theRightQuery
-     */
-    public AbstractBinaryQuery(Query theLeftQuery, Query theRightQuery)
-    {
-        leftQuery = theLeftQuery;
-        rightQuery = theRightQuery;
-    }
-
-    /**
-     * @return Returns the leftQuery.
-     */
-    public Query getLeftQuery()
-    {
-        return leftQuery;
-    }
-
-    /**
-     * @return Returns the rightQuery.
-     */
-    public Query getRightQuery()
-    {
-        return rightQuery;
-    }
-
-    private Query leftQuery;
-    private Query rightQuery;
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AbstractQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,55 +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: BaseQuery.java 763 2005-07-27 19:26:43 -0400 (Wed, 27 Jul 2005) dmsmith $
- */
-package org.crosswire.jsword.index.query.basic;
-
-import org.crosswire.jsword.index.query.Query;
-
-/**
- * A base query is the smallest unit of search that the index can perform.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public abstract class AbstractQuery implements Query
-{
-
-    /**
-     * Construct a query from a string.
-     * 
-     * @param theQuery
-     */
-    public AbstractQuery(String theQuery)
-    {
-        query = theQuery;
-    }
-
-    /**
-     * @return the query
-     */
-    public String getQuery()
-    {
-        return query;
-    }
-
-    private String query;
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndNotQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,75 +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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.query.Query;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * An "And Not" query specifies that a result needs to be in the left
- * but not in the right query result.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class AndNotQuery extends AbstractBinaryQuery
-{
-
-    /**
-     * Create a query where the right query result is subtracted from the left query result.
-     * 
-     * @param theLeftQuery
-     * @param theRightQuery
-     */
-    public AndNotQuery(Query theLeftQuery, Query theRightQuery)
-    {
-        super(theLeftQuery, theRightQuery);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        Key left = getLeftQuery().find(index);
-
-        if (left.isEmpty())
-        {
-            return left;
-        }
-
-        Key right = getRightQuery().find(index);
-
-        if (right.isEmpty())
-        {
-            return left;
-        }
-
-        left.removeAll(right);
-
-        return left;
-    }
-
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/AndQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.query.Query;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * An AND query specifies that a result needs to be in both the left and the right query results.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class AndQuery extends AbstractBinaryQuery
-{
-
-    /**
-     * Create a query where the result is the intersection of two queries.
-     * 
-     * @param theLeftQuery
-     * @param theRightQuery
-     */
-    public AndQuery(Query theLeftQuery, Query theRightQuery)
-    {
-        super(theLeftQuery, theRightQuery);
-    }
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        Key left = getLeftQuery().find(index);
-
-        if (left.isEmpty())
-        {
-            return left;
-        }
-
-        Key right = getRightQuery().find(index);
-
-        if (right.isEmpty())
-        {
-            return right;
-        }
-
-        left.retainAll(right);
-
-        return left;
-    }
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BaseQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,55 +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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * A base query is the smallest unit of search that the index can perform.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class BaseQuery extends AbstractQuery
-{
-
-    /**
-     * Construct a query from a string.
-     * 
-     * @param theQuery
-     */
-    public BaseQuery(String theQuery)
-    {
-        super(theQuery);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        return index.find(getQuery());
-    }
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/BlurQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,88 +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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.query.Query;
-import org.crosswire.jsword.passage.Key;
-import org.crosswire.jsword.passage.RestrictionType;
-
-/**
- * A blur query specifies how much to blur the results of the right query
- * before ANDing it to the left.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class BlurQuery extends AbstractBinaryQuery
-{
-    /**
-     * Create a query that specifies how much to blur the results of the right query
-     * before ANDing it to the left.
-     * 
-     * @param theLeftQuery
-     * @param theRightQuery
-     */
-    public BlurQuery(Query theLeftQuery, Query theRightQuery, int theFactor)
-    {
-        super(theLeftQuery, theRightQuery);
-        factor = theFactor;
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        Key left = getLeftQuery().find(index);
-
-        if (left.isEmpty())
-        {
-            return left;
-        }
-
-        Key right = getRightQuery().find(index);
-
-        if (right.isEmpty())
-        {
-            return right;
-        }
-
-        right.blur(factor, RestrictionType.getDefaultBlurRestriction());
-
-        left.retainAll(right);
-
-        return left;
-    }
-
-    /**
-     * @return the blur factor
-     */
-    public int getFactor()
-    {
-        return factor;
-    }
-
-    private int factor;
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,44 +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: Msg.java 763 2005-07-27 23:26:43Z dmsmith $
- */
-package org.crosswire.jsword.index.query.basic;
-
-import org.crosswire.common.util.MsgBase;
-
-/**
- * Compile safe Msg resource settings.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-final class Msg extends MsgBase
-{
-    static final Msg ILLEGAL_PASSAGE = new Msg("RangeQuery.IllegalPassage"); //$NON-NLS-1$
-
-    /**
-     * Passthrough ctor
-     */
-    private Msg(String name)
-    {
-        super(name);
-    }
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.properties	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/Msg.properties	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,8 +0,0 @@
-# The naming convention for the keys in the file is ClassName.MessageName
-# Where ClassName is the name of the class using the property.
-# When the resource is used by more than one class it should be the one
-# that the resource is most closely associated.
-# The MessageName should be mixed case, with a leading capital.
-# It should have no spaces or other punctuation (e.g. _, -, ', ...)
-
-RangeQuery.IllegalPassage=Syntax Error: Invalid passage "{0}"

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/NullQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,53 +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: OrQuery.java 964 2006-01-22 10:10:00 -0500 (Sun, 22 Jan 2006) dmsmith $
- */
-package org.crosswire.jsword.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.query.Query;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * A null query searches for nothing and returns an empty Key.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class NullQuery implements Query
-{
-    /**
-     * Create a NullQuery.
-     */
-    public NullQuery()
-    {
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.query.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        return index.find(null);
-    }
-
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/OrQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,69 +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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.index.query.Query;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * An OR query specifies that a result is the union of the left and the right query results.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [ dmsmith555 at yahoo dot com]
- */
-public class OrQuery extends AbstractBinaryQuery
-{
-
-    /**
-     * 
-     */
-    public OrQuery(Query theLeftQuery, Query theRightQuery)
-    {
-        super(theLeftQuery, theRightQuery);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        Key left = getLeftQuery().find(index);
-        Key right = getRightQuery().find(index);
-
-        if (left.isEmpty())
-        {
-            return right;
-        }
-
-        if (right.isEmpty())
-        {
-            return left;
-        }
-
-        left.addAll(right);
-
-        return left;
-    }
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/query/basic/RangeQuery.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,65 +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.index.query.basic;
-
-import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.index.Index;
-import org.crosswire.jsword.passage.Key;
-import org.crosswire.jsword.passage.NoSuchKeyException;
-
-/**
- * A range query specifies how a range should be included in the search.
- * It provides a range, a modifier (AND [+] or AND NOT [-]).
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [ dmsmith555 at yahoo dot com]
- */
-public class RangeQuery extends AbstractQuery
-{
-
-    /**
-     * Construct a query from the range specification.
-     * 
-     * @param theRange
-     */
-    public RangeQuery(String theRange)
-    {
-        super(theRange);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.parse.Query#find(org.crosswire.jsword.index.search.Index)
-     */
-    public Key find(Index index) throws BookException
-    {
-        String range = getQuery();
-        try
-        {
-            return index.getKey(range);
-        }
-        catch (NoSuchKeyException e)
-        {
-            throw new BookException(Msg.ILLEGAL_PASSAGE, e, new Object[] { range });
-        }
-    }
-}

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,58 @@
+/**
+ * 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:DefaultSearchModifier.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.search;
+
+
+/**
+ * The DefaultSearchModifier provides a simple implementation
+ * of a SearchModifier.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at gmail dot com]
+ */
+
+public class DefaultSearchModifier implements SearchModifier
+{
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.SearchModifier#isRanked()
+     */
+    public boolean isRanked()
+    {
+        return ranked;
+    }
+
+    /**
+     * Set whether or not the search should be ranked.
+     * @param newRanked true if the search should be ranked
+     */
+    public void setRanked(boolean newRanked)
+    {
+        ranked = newRanked;
+    }
+
+    /**
+     * The indicator of whether the request should be ranked.
+     */
+    private boolean ranked;
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java (from rev 984, trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java)
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java	2006-01-23 19:18:33 UTC (rev 984)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -0,0 +1,81 @@
+/**
+ * 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:DefaultSearchRequest.java 984 2006-01-23 14:18:33 -0500 (Mon, 23 Jan 2006) dmsmith $
+ */
+package org.crosswire.jsword.index.search;
+
+
+/**
+ * A default implementation of a SearchRequest.
+ * 
+ * @see gnu.lgpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class DefaultSearchRequest implements SearchRequest
+{
+
+    /**
+     * Create a DefaultSearchRequest for the provided request and
+     * the provided modifiers.
+     * @param theRequest what is being searched
+     * @param theModifier how the search is to be modified
+     */
+    public DefaultSearchRequest(String theRequest, SearchModifier theModifier)
+    {
+        request = theRequest;
+        modifier = theModifier;
+    }
+
+    /**
+     * Create a DefaultSearchRequest for the provided request.
+     * @param theRequest what is being searched
+     */
+    public DefaultSearchRequest(String theRequest)
+    {
+        this(theRequest, null);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.SearchRequest#isRanked()
+     */
+    public SearchModifier getSearchModifier()
+    {
+        return modifier;
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.index.search.SearchRequest#getRequest()
+     */
+    public String getRequest()
+    {
+        return request;
+    }
+
+    /**
+     * The actual search request
+     */
+    private String request;
+
+    /**
+     * How the search is to be modified
+     */
+    private SearchModifier modifier;
+}


Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchModifier.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,59 +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.index.search.basic;
-
-import org.crosswire.jsword.index.search.SearchModifier;
-
-/**
- * The DefaultSearchModifier provides a simple implementation
- * of a SearchModifier.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at gmail dot com]
- */
-
-public class DefaultSearchModifier implements SearchModifier
-{
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.SearchModifier#isRanked()
-     */
-    public boolean isRanked()
-    {
-        return ranked;
-    }
-
-    /**
-     * Set whether or not the search should be ranked.
-     * @param newRanked true if the search should be ranked
-     */
-    public void setRanked(boolean newRanked)
-    {
-        ranked = newRanked;
-    }
-
-    /**
-     * The indicator of whether the request should be ranked.
-     */
-    private boolean ranked;
-}

Deleted: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java	2006-01-23 19:22:50 UTC (rev 986)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/basic/DefaultSearchRequest.java	2006-01-23 19:26:33 UTC (rev 987)
@@ -1,83 +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.index.search.basic;
-
-import org.crosswire.jsword.index.search.SearchModifier;
-import org.crosswire.jsword.index.search.SearchRequest;
-
-/**
- * A default implementation of a SearchRequest.
- * 
- * @see gnu.lgpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public class DefaultSearchRequest implements SearchRequest
-{
-
-    /**
-     * Create a DefaultSearchRequest for the provided request and
-     * the provided modifiers.
-     * @param theRequest what is being searched
-     * @param theModifier how the search is to be modified
-     */
-    public DefaultSearchRequest(String theRequest, SearchModifier theModifier)
-    {
-        request = theRequest;
-        modifier = theModifier;
-    }
-
-    /**
-     * Create a DefaultSearchRequest for the provided request.
-     * @param theRequest what is being searched
-     */
-    public DefaultSearchRequest(String theRequest)
-    {
-        this(theRequest, null);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.SearchRequest#isRanked()
-     */
-    public SearchModifier getSearchModifier()
-    {
-        return modifier;
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.jsword.index.search.SearchRequest#getRequest()
-     */
-    public String getRequest()
-    {
-        return request;
-    }
-
-    /**
-     * The actual search request
-     */
-    private String request;
-
-    /**
-     * How the search is to be modified
-     */
-    private SearchModifier modifier;
-}



More information about the jsword-svn mailing list