[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/search/lucene s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Mar 6 13:21:49 MST 2005


Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene
In directory www.crosswire.org:/tmp/cvs-serv26524/java/jsword/org/crosswire/jsword/book/search/lucene

Modified Files:
	LuceneIndex.java LuceneIndexManager.java 
Log Message:
Changes to satisfy CheckStyle

Index: LuceneIndex.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndex.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LuceneIndex.java	4 Mar 2005 04:04:47 -0000	1.5
--- LuceneIndex.java	6 Mar 2005 20:21:47 -0000	1.6
***************
*** 101,105 ****
          try
          {
!             synchronized (creating)
              {
                  book.getBookMetaData().setIndexStatus(IndexStatus.CREATING);
--- 101,105 ----
          try
          {
!             synchronized (CREATING)
              {
                  book.getBookMetaData().setIndexStatus(IndexStatus.CREATING);
***************
*** 110,116 ****
  
                  generateSearchIndexImpl(job, writer, book.getGlobalKeyList());
!         
                  job.setProgress(95, Msg.OPTIMIZING.toString());
!         
                  writer.optimize();
                  writer.close();
--- 110,116 ----
  
                  generateSearchIndexImpl(job, writer, book.getGlobalKeyList());
! 
                  job.setProgress(95, Msg.OPTIMIZING.toString());
! 
                  writer.optimize();
                  writer.close();
***************
*** 129,133 ****
          {
              job.done();
!         }                
      }
  
--- 129,133 ----
          {
              job.done();
!         }
      }
  
***************
*** 151,155 ****
                      Query query = QueryParser.parse(search, LuceneIndex.FIELD_BODY, analyzer);
                      Hits hits = searcher.search(query);
!     
                      for (int i = 0; i < hits.length(); i++)
                      {
--- 151,155 ----
                      Query query = QueryParser.parse(search, LuceneIndex.FIELD_BODY, analyzer);
                      Hits hits = searcher.search(query);
! 
                      for (int i = 0; i < hits.length(); i++)
                      {
***************
*** 167,171 ****
              else
              {
!                 log.warn("Missing searcher, skipping search for: "+search); //$NON-NLS-1$
              }
          }
--- 167,171 ----
              else
              {
!                 log.warn("Missing searcher, skipping search for: " + search); //$NON-NLS-1$
              }
          }
***************
*** 264,268 ****
                  catch (NoSuchVerseException ex)
                  {
!                     log.error("Failed to get book name from verse: "+verse, ex); //$NON-NLS-1$
                      assert false;
                      name = subkey.getName();
--- 264,268 ----
                  catch (NoSuchVerseException ex)
                  {
!                     log.error("Failed to get book name from verse: " + verse, ex); //$NON-NLS-1$
                      assert false;
                      name = subkey.getName();
***************
*** 284,293 ****
       * A synchronization lock point to prevent us from doing 2 index runs at a time.
       */
!     private static final Object creating = new Object();
  
      /**
       * Are we active
       */
!     private boolean active = false;
  
      /**
--- 284,293 ----
       * A synchronization lock point to prevent us from doing 2 index runs at a time.
       */
!     private static final Object CREATING = new Object();
  
      /**
       * Are we active
       */
!     private boolean active;
  
      /**

Index: LuceneIndexManager.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndexManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LuceneIndexManager.java	26 Jan 2005 00:57:33 -0000	1.4
--- LuceneIndexManager.java	6 Mar 2005 20:21:47 -0000	1.5
***************
*** 70,79 ****
          try
          {
!             Index reply = (Index) indexes.get(book);
              if (reply == null)
              {
                  URL storage = getStorageArea(book.getBookMetaData());
                  reply = new LuceneIndex(book, storage);
!                 indexes.put(book, reply);
              }
  
--- 70,79 ----
          try
          {
!             Index reply = (Index) INDEXES.get(book);
              if (reply == null)
              {
                  URL storage = getStorageArea(book.getBookMetaData());
                  reply = new LuceneIndex(book, storage);
!                 INDEXES.put(book, reply);
              }
  
***************
*** 101,105 ****
                      URL storage = getStorageArea(book.getBookMetaData());
                      Index index = new LuceneIndex(book, storage, true);
!                     indexes.put(book, index);
                  }
                  catch (Exception ex)
--- 101,105 ----
                      URL storage = getStorageArea(book.getBookMetaData());
                      Index index = new LuceneIndex(book, storage, true);
!                     INDEXES.put(book, index);
                  }
                  catch (Exception ex)
***************
*** 169,173 ****
       * The created indexes
       */
!     protected static final Map indexes = new HashMap();
  
      /**
--- 169,173 ----
       * The created indexes
       */
!     protected static final Map INDEXES = new HashMap();
  
      /**



More information about the jsword-svn mailing list