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

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


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

Modified Files:
	RawBookDriver.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: RawBookDriver.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/raw/RawBookDriver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** RawBookDriver.java	25 Jun 2004 15:02:02 -0000	1.3
--- RawBookDriver.java	19 Mar 2005 01:56:47 -0000	1.4
***************
*** 10,14 ****
  import org.crosswire.common.util.Reporter;
  import org.crosswire.jsword.book.Book;
- import org.crosswire.jsword.book.BookMetaData;
  import org.crosswire.jsword.book.basic.AbstractBookDriver;
  import org.crosswire.jsword.book.basic.BookRoot;
--- 10,13 ----
***************
*** 43,47 ****
       * @see org.crosswire.jsword.book.BookDriver#getBooks()
       */
!     public BookMetaData[] getBookMetaDatas()
      {
          try
--- 42,46 ----
       * @see org.crosswire.jsword.book.BookDriver#getBooks()
       */
!     public Book[] getBooks()
      {
          try
***************
*** 52,56 ****
              {
                  log.debug("Missing raw directory: "+dir.toExternalForm()); //$NON-NLS-1$
!                 return new BookMetaData[0];
              }
  
--- 51,55 ----
              {
                  log.debug("Missing raw directory: "+dir.toExternalForm()); //$NON-NLS-1$
!                 return new Book[0];
              }
  
***************
*** 65,69 ****
              }
  
!             List bmds = new ArrayList();
  
              for (int i=0; i<names.length; i++)
--- 64,68 ----
              }
  
!             List books = new ArrayList();
  
              for (int i=0; i<names.length; i++)
***************
*** 77,89 ****
                  Book book = new RawBook(this, prop, url);
  
!                 bmds.add(book.getBookMetaData());
              }
  
!             return (BookMetaData[]) bmds.toArray(new BookMetaData[bmds.size()]);
          }
          catch (Exception ex)
          {
              Reporter.informUser(this, ex);
!             return new BookMetaData[0];
          }
      }
--- 76,88 ----
                  Book book = new RawBook(this, prop, url);
  
!                 books.add(book);
              }
  
!             return (Book[]) books.toArray(new Book[books.size()]);
          }
          catch (Exception ex)
          {
              Reporter.informUser(this, ex);
!             return new Book[0];
          }
      }



More information about the jsword-svn mailing list