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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun May 8 18:29:08 MST 2005


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

Modified Files:
	RawBook.java 
Log Message:
Moved unused code to limbo.
Upgraded support-tools: checkstyle, pmd and findbugs to most recent.
Addressed over 100 issues reported by findbugs and checkstyle.
Resulted in major refactoring of GBFFilter.
Net result is that code size is significantly smaller.

Index: RawBook.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/raw/RawBook.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RawBook.java	5 Oct 2004 22:03:09 -0000	1.8
--- RawBook.java	9 May 2005 01:29:06 -0000	1.9
***************
*** 15,21 ****
  import org.crosswire.jsword.book.CaseType;
  import org.crosswire.jsword.book.OSISUtil;
! import org.crosswire.jsword.book.SentanceUtil;
  import org.crosswire.jsword.book.basic.DefaultBookMetaData;
! import org.crosswire.jsword.book.basic.PassageAbstractBook;
  import org.crosswire.jsword.book.filter.Filter;
  import org.crosswire.jsword.book.filter.FilterFactory;
--- 15,21 ----
  import org.crosswire.jsword.book.CaseType;
  import org.crosswire.jsword.book.OSISUtil;
! import org.crosswire.jsword.book.SentenceUtil;
  import org.crosswire.jsword.book.basic.DefaultBookMetaData;
! import org.crosswire.jsword.book.basic.AbstractPassageBook;
  import org.crosswire.jsword.book.filter.Filter;
  import org.crosswire.jsword.book.filter.FilterFactory;
***************
*** 205,209 ****
   * @version $Id$
   */
! public class RawBook extends PassageAbstractBook
  {
      /**
--- 205,209 ----
   * @version $Id$
   */
! public class RawBook extends AbstractPassageBook
  {
      /**
***************
*** 271,275 ****
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.PassageAbstractBook#getFilter()
       */
      protected Filter getFilter()
--- 271,275 ----
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.AbstractPassageBook#getFilter()
       */
      protected Filter getFilter()
***************
*** 279,283 ****
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.PassageAbstractBook#getText(org.crosswire.jsword.passage.Verse)
       */
      protected String getText(Key key)
--- 279,283 ----
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.AbstractPassageBook#getText(org.crosswire.jsword.passage.Verse)
       */
      protected String getText(Key key)
***************
*** 329,333 ****
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.PassageAbstractBook#setText(org.crosswire.jsword.passage.Verse, java.lang.String)
       */
      protected void setText(Verse verse, String text) throws BookException
--- 329,333 ----
  
      /* (non-Javadoc)
!      * @see org.crosswire.jsword.book.basic.AbstractPassageBook#setText(org.crosswire.jsword.passage.Verse, java.lang.String)
       */
      protected void setText(Verse verse, String text) throws BookException
***************
*** 416,428 ****
  
                      // Chop the sentence into words.
!                     String[] textArray = SentanceUtil.tokenize(text);
  
                      // The word index
!                     String[] wordArray = SentanceUtil.stripPunctuation(textArray);
                      int[] wordIndexes = wordItems.getIndex(wordArray);
                      wordInsts.setIndexes(wordIndexes, verse);
  
                      // The punctuation index
!                     String[] puncArray = SentanceUtil.stripWords(textArray);
                      int[] puncIndexes = puncItems.getIndex(puncArray);
                      puncInsts.setIndexes(puncIndexes, verse);
--- 416,428 ----
  
                      // Chop the sentence into words.
!                     String[] textArray = SentenceUtil.tokenize(text);
  
                      // The word index
!                     String[] wordArray = SentenceUtil.stripPunctuation(textArray);
                      int[] wordIndexes = wordItems.getIndex(wordArray);
                      wordInsts.setIndexes(wordIndexes, verse);
  
                      // The punctuation index
!                     String[] puncArray = SentenceUtil.stripWords(textArray);
                      int[] puncIndexes = puncItems.getIndex(puncArray);
                      puncInsts.setIndexes(puncIndexes, verse);



More information about the jsword-svn mailing list