[jsword-svn] jsword/java/limbo/org/crosswire/jsword/book/jdbc 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/jdbc
In directory www.crosswire.org:/tmp/cvs-serv10359/java/limbo/org/crosswire/jsword/book/jdbc

Modified Files:
	JDBCBookDriver.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: JDBCBookDriver.java
===================================================================
RCS file: /cvs/jsword/jsword/java/limbo/org/crosswire/jsword/book/jdbc/JDBCBookDriver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** JDBCBookDriver.java	25 Jun 2004 15:02:02 -0000	1.3
--- JDBCBookDriver.java	19 Mar 2005 01:56:46 -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 jdbc directory: "+dir.toExternalForm()); //$NON-NLS-1$
!                 return new BookMetaData[0];
              }
  
--- 51,55 ----
              {
                  log.debug("Missing jdbc 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 JDBCBook(this, prop);
  
!                 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 JDBCBook(this, prop);
  
!                 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