[jsword-svn] jsword-support/java/historic/org/crosswire/jsword/view/cli s

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


Update of /cvs/jsword/jsword-support/java/historic/org/crosswire/jsword/view/cli
In directory www.crosswire.org:/tmp/cvs-serv10655/java/historic/org/crosswire/jsword/view/cli

Modified Files:
	Model.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: Model.java
===================================================================
RCS file: /cvs/jsword/jsword-support/java/historic/org/crosswire/jsword/view/cli/Model.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Model.java	27 Jul 2004 21:41:13 -0000	1.2
--- Model.java	19 Mar 2005 01:56:57 -0000	1.3
***************
*** 69,75 ****
      public String dictList()
      {
!         List dicts = Books.installed().getBookMetaDatas(BookFilters.getDictionaries());
!         BookMetaData bmd = (BookMetaData) dicts.get(0);
!         Book dict = bmd.getBook();
  
          KeyList set = dict.getGlobalKeyList();
--- 69,74 ----
      public String dictList()
      {
!         List dicts = Books.installed().getBooks(BookFilters.getDictionaries());
!         Book dict = (Book) dicts.get(0);
  
          KeyList set = dict.getGlobalKeyList();
***************
*** 104,110 ****
      public String search(String str) throws BookException
      {
!         List dicts = Books.installed().getBookMetaDatas(BookFilters.getBibles());
!         BookMetaData bmd = (BookMetaData) dicts.get(0);
!         Book book = bmd.getBook();
          
          Key key = book.find(new Search(str, false));
--- 103,108 ----
      public String search(String str) throws BookException
      {
!         List dicts = Books.installed().getBooks(BookFilters.getBibles());
!         Book book = (Book) dicts.get(0);
          
          Key key = book.find(new Search(str, false));
***************
*** 114,120 ****
      public String match(String str) throws BookException
      {
!         List dicts = Books.installed().getBookMetaDatas(BookFilters.getBibles());
!         BookMetaData bmd = (BookMetaData) dicts.get(0);
!         Book book = bmd.getBook();
  
          Key key = book.find(new Search(str, true));
--- 112,117 ----
      public String match(String str) throws BookException
      {
!         List dicts = Books.installed().getBooks(BookFilters.getBibles());
!         Book book = (Book) dicts.get(0);
  
          Key key = book.find(new Search(str, true));
***************
*** 146,154 ****
          StringBuffer buffer = new StringBuffer();
  
!         List list = Books.installed().getBookMetaDatas(filter);
          for (Iterator it = list.iterator(); it.hasNext();)
          {
!             BookMetaData bmd = (BookMetaData) it.next();
!             buffer.append(bmd.getFullName());
              
              if (it.hasNext())
--- 143,151 ----
          StringBuffer buffer = new StringBuffer();
  
!         List list = Books.installed().getBooks(filter);
          for (Iterator it = list.iterator(); it.hasNext();)
          {
!             Book book = (Book) it.next();
!             buffer.append(book.getBookMetaData().getFullName());
              
              if (it.hasNext())



More information about the jsword-svn mailing list