[jsword-svn] jsword/java/jswordtest/org/crosswire/jsword/book s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Fri Mar 18 18:56:49 MST 2005


Update of /cvs/jsword/jsword/java/jswordtest/org/crosswire/jsword/book
In directory www.crosswire.org:/tmp/cvs-serv10359/java/jswordtest/org/crosswire/jsword/book

Modified Files:
	BooksTest.java ReadEverything.java BookParentTst.java 
Log Message:
Made Book the primary interface to a module and put BookMetaData within it. All of BookMetaData is accessible through the Book interface.

Index: ReadEverything.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jswordtest/org/crosswire/jsword/book/ReadEverything.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** ReadEverything.java	17 Feb 2005 03:40:25 -0000	1.25
--- ReadEverything.java	19 Mar 2005 01:56:47 -0000	1.26
***************
*** 62,74 ****
          // Loop through all the Bookks
          log.info("*** Reading all known Books"); //$NON-NLS-1$
!         List comments = Books.installed().getBookMetaDatas();
          for (Iterator cit = comments.iterator(); cit.hasNext();)
          {
!             BookMetaData bmd = (BookMetaData) cit.next();
  
-             Book book = bmd.getBook();
              Key set = book.getGlobalKeyList();
  
!             testReadMultiple(bmd, book, set);
          }
      }
--- 62,73 ----
          // Loop through all the Bookks
          log.info("*** Reading all known Books"); //$NON-NLS-1$
!         List comments = Books.installed().getBooks();
          for (Iterator cit = comments.iterator(); cit.hasNext();)
          {
!             Book book = (Book) cit.next();
  
              Key set = book.getGlobalKeyList();
  
!             testReadMultiple(book.getBookMetaData(), book, set);
          }
      }

Index: BookParentTst.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jswordtest/org/crosswire/jsword/book/BookParentTst.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** BookParentTst.java	8 Feb 2004 23:03:23 -0000	1.3
--- BookParentTst.java	19 Mar 2005 01:56:47 -0000	1.4
***************
*** 44,48 ****
      protected void setUp() throws Exception
      {
!         List lbmds = Books.installed().getBookMetaDatas(BookFilters.getBibles());
          bibles = new Book[lbmds.size()];
          bmds = new BookMetaData[lbmds.size()];
--- 44,48 ----
      protected void setUp() throws Exception
      {
!         List lbmds = Books.installed().getBooks(BookFilters.getBibles());
          bibles = new Book[lbmds.size()];
          bmds = new BookMetaData[lbmds.size()];
***************
*** 51,56 ****
          for (Iterator it = lbmds.iterator(); it.hasNext();)
          {
!             bmds[i] = (BookMetaData) it.next();
!             bibles[i] = bmds[i].getBook();
              i++;
          }
--- 51,56 ----
          for (Iterator it = lbmds.iterator(); it.hasNext();)
          {
!             bibles[i] = (Book) it.next();
!             bmds[i] = bibles[i].getBookMetaData();
              i++;
          }

Index: BooksTest.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jswordtest/org/crosswire/jsword/book/BooksTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** BooksTest.java	5 Oct 2004 22:03:09 -0000	1.9
--- BooksTest.java	19 Mar 2005 01:56:47 -0000	1.10
***************
*** 51,55 ****
      protected void setUp() throws Exception
      {
!         List lbmds = Books.installed().getBookMetaDatas(BookFilters.getBibles());
          int numBibles = lbmds.size();
          bibles = new Book[numBibles];
--- 51,55 ----
      protected void setUp() throws Exception
      {
!         List lbmds = Books.installed().getBooks(BookFilters.getBibles());
          int numBibles = lbmds.size();
          bibles = new Book[numBibles];
***************
*** 60,68 ****
          for (Iterator it = lbmds.iterator(); it.hasNext();)
          {
!             bmds[i] = (BookMetaData) it.next();
!             bibles[i] = bmds[i].getBook();
! 
              gen11[i] = bibles[i].getKey("Gen 1:1"); //$NON-NLS-1$
- 
              i++;
          }
--- 60,66 ----
          for (Iterator it = lbmds.iterator(); it.hasNext();)
          {
!             bibles[i] = (Book) it.next();
!             bmds[i] = bibles[i].getBookMetaData();
              gen11[i] = bibles[i].getKey("Gen 1:1"); //$NON-NLS-1$
              i++;
          }
***************
*** 78,82 ****
          {
              Book bible = bibles[i];
!             log.debug("testing bible: " + bible.getBookMetaData().getFullName()); //$NON-NLS-1$
              assertTrue(bible != null);
          }
--- 76,80 ----
          {
              Book bible = bibles[i];
!             log.debug("testing bible: " + bible.getFullName()); //$NON-NLS-1$
              assertTrue(bible != null);
          }



More information about the jsword-svn mailing list