[jsword-svn] jsword/java/limbo/org/crosswire/jsword/book/remote s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sat Oct 9 14:45:07 MST 2004


Update of /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote
In directory www.crosswire.org:/tmp/cvs-serv30045/java/limbo/org/crosswire/jsword/book/remote

Modified Files:
	LocalRemoter.java ParamName.java RemoteMethodTest.java 
	RemoteBook.java 
Log Message:
indexing updates

Index: RemoteBook.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote/RemoteBook.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RemoteBook.java	5 Oct 2004 22:03:09 -0000	1.7
--- RemoteBook.java	9 Oct 2004 21:45:05 -0000	1.8
***************
*** 8,12 ****
  import org.crosswire.jsword.book.BookMetaData;
  import org.crosswire.jsword.book.BookType;
- import org.crosswire.jsword.book.Search;
  import org.crosswire.jsword.book.basic.AbstractBook;
  import org.crosswire.jsword.book.basic.DefaultBookMetaData;
--- 8,11 ----
***************
*** 103,107 ****
       * @see org.crosswire.jsword.book.Bible#findPassage(org.crosswire.jsword.book.Search)
       */
!     public Key find(Search search) throws BookException
      {
          try
--- 102,106 ----
       * @see org.crosswire.jsword.book.Bible#findPassage(org.crosswire.jsword.book.Search)
       */
!     public Key find(String search) throws BookException
      {
          try
***************
*** 109,115 ****
              RemoteMethod method = new RemoteMethod(MethodName.FINDPASSAGE);
              method.addParam(ParamName.PARAM_BIBLE, driver.getID(getBookMetaData()));
!             method.addParam(ParamName.PARAM_FINDSTRING, search.getMatch());
!             method.addParam(ParamName.PARAM_FINDMATCH, Boolean.toString(search.isBestMatch()));
!             method.addParam(ParamName.PARAM_FINDRANGE, search.getRestriction().getName());
              Document doc = remoter.execute(method);
  
--- 108,112 ----
              RemoteMethod method = new RemoteMethod(MethodName.FINDPASSAGE);
              method.addParam(ParamName.PARAM_BIBLE, driver.getID(getBookMetaData()));
!             method.addParam(ParamName.PARAM_FINDSTRING, search);
              Document doc = remoter.execute(method);
  

Index: RemoteMethodTest.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote/RemoteMethodTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RemoteMethodTest.java	21 Sep 2004 17:46:23 -0000	1.2
--- RemoteMethodTest.java	9 Oct 2004 21:45:05 -0000	1.3
***************
*** 64,69 ****
  
          rmt1.addParam(ParamName.PARAM_BIBLE, "v1:1"); //$NON-NLS-1$
-         rmt2.addParam(ParamName.PARAM_FINDMATCH, "v2:1"); //$NON-NLS-1$
-         rmt2.addParam(ParamName.PARAM_FINDRANGE, "v2:2"); //$NON-NLS-1$
          rmt3.addParam(ParamName.PARAM_FINDSTRING, "v3:1"); //$NON-NLS-1$
          rmt3.addParam(ParamName.PARAM_PASSAGE, "v3:2"); //$NON-NLS-1$
--- 64,67 ----
***************
*** 82,87 ****
  
          assertEquals(null, rmt1.getParameter(ParamName.PARAM_BIBLE));
-         assertEquals("v2:1", rmt2.getParameter(ParamName.PARAM_FINDMATCH)); //$NON-NLS-1$
-         assertEquals("v2:2", rmt2.getParameter(ParamName.PARAM_FINDRANGE)); //$NON-NLS-1$
          assertEquals("v3:1", rmt3.getParameter(ParamName.PARAM_FINDSTRING)); //$NON-NLS-1$
          assertEquals("v3:2", rmt3.getParameter(ParamName.PARAM_PASSAGE)); //$NON-NLS-1$
--- 80,83 ----

Index: ParamName.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote/ParamName.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ParamName.java	21 Sep 2004 17:46:23 -0000	1.2
--- ParamName.java	9 Oct 2004 21:45:05 -0000	1.3
***************
*** 32,37 ****
      static final ParamName PARAM_PASSAGE = new ParamName("passage"); //$NON-NLS-1$
      static final ParamName PARAM_FINDSTRING = new ParamName("word"); //$NON-NLS-1$
-     static final ParamName PARAM_FINDMATCH = new ParamName("match"); //$NON-NLS-1$
-     static final ParamName PARAM_FINDRANGE = new ParamName("range"); //$NON-NLS-1$
  
      /**
--- 32,35 ----
***************
*** 111,115 ****
      private static final ParamName[] VALUES =
      {
!                     PARAM_BIBLE, PARAM_PASSAGE, PARAM_FINDSTRING, PARAM_FINDMATCH, PARAM_FINDRANGE
      };
  }
\ No newline at end of file
--- 109,115 ----
      private static final ParamName[] VALUES =
      {
!         PARAM_BIBLE,
!         PARAM_PASSAGE,
!         PARAM_FINDSTRING,
      };
  }
\ No newline at end of file

Index: LocalRemoter.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/remote/LocalRemoter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LocalRemoter.java	5 Oct 2004 22:03:09 -0000	1.4
--- LocalRemoter.java	9 Oct 2004 21:45:05 -0000	1.5
***************
*** 12,16 ****
  import org.crosswire.jsword.book.BookMetaData;
  import org.crosswire.jsword.book.Books;
- import org.crosswire.jsword.book.Search;
  import org.crosswire.jsword.passage.Key;
  import org.jdom.Document;
--- 12,15 ----
***************
*** 91,101 ****
  
                  String word = method.getParameter(ParamName.PARAM_FINDSTRING);
!                 boolean match = Boolean.getBoolean(method.getParameter(ParamName.PARAM_FINDMATCH));
!                 String refstr = method.getParameter(ParamName.PARAM_FINDRANGE);
!                 Key range = book.getKey(refstr);
!                 Search search = new Search(word, match);
!                 search.setRestriction(range);
! 
!                 Key key = book.find(search);
                  return Converter.convertKeyListToDocument(key);
              }
--- 90,94 ----
  
                  String word = method.getParameter(ParamName.PARAM_FINDSTRING);
!                 Key key = book.find(word);
                  return Converter.convertKeyListToDocument(key);
              }



More information about the jsword-svn mailing list