[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sun Jan 1 20:40:11 MST 2006
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book
In directory www.crosswire.org:/tmp/cvs-serv25586/java/jsword/org/crosswire/jsword/book
Modified Files:
BookFilters.java BookMetaData.java Defaults.java
BookCategory.java
Log Message:
A mostly complete implementation of daily devotion as a separate book type.
Index: Defaults.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Defaults.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** Defaults.java 2 Aug 2005 11:43:57 -0000 1.35
--- Defaults.java 2 Jan 2006 03:40:08 -0000 1.36
***************
*** 72,76 ****
public static void setCurrentBook(Book book)
{
! BookCategory type = book.getType();
if (type.equals(BookCategory.BIBLE) && isCurrentBible())
{
--- 72,76 ----
public static void setCurrentBook(Book book)
{
! BookCategory type = book.getBookCategory();
if (type.equals(BookCategory.BIBLE) && isCurrentBible())
{
Index: BookFilters.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookFilters.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** BookFilters.java 2 Aug 2005 11:43:57 -0000 1.17
--- BookFilters.java 2 Jan 2006 03:40:08 -0000 1.18
***************
*** 88,92 ****
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.BIBLE);
}
}
--- 88,92 ----
public boolean test(Book book)
{
! return book.getBookCategory().equals(BookCategory.BIBLE);
}
}
***************
*** 112,116 ****
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.DICTIONARY);
}
}
--- 112,119 ----
public boolean test(Book book)
{
! BookCategory category = book.getBookCategory();
! return category.equals(BookCategory.DICTIONARY)
! || category.equals(BookCategory.GLOSSARY)
! || category.equals(BookCategory.DAILY_DEVOTIONS);
}
}
***************
*** 136,140 ****
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.COMMENTARY);
}
}
--- 139,143 ----
public boolean test(Book book)
{
! return book.getBookCategory().equals(BookCategory.COMMENTARY);
}
}
Index: BookMetaData.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookMetaData.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** BookMetaData.java 27 Jul 2005 23:25:46 -0000 1.31
--- BookMetaData.java 2 Jan 2006 03:40:08 -0000 1.32
***************
*** 57,65 ****
/**
! * What type of content is this, a Bible or a reference work like a
! * Dictionary or Commentary
! * @return The type of book
*/
! BookCategory getType();
/**
--- 57,65 ----
/**
! * What category of content is this, a Bible or a reference work like a
! * Dictionary or Commentary.
! * @return The category of book
*/
! BookCategory getBookCategory();
/**
***************
*** 162,166 ****
* The key for the type in the properties map
*/
! String KEY_TYPE = "Key"; //$NON-NLS-1$
/**
--- 162,166 ----
* The key for the type in the properties map
*/
! String KEY_CATEGORY = "Category"; //$NON-NLS-1$
/**
Index: BookCategory.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookCategory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BookCategory.java 27 Jul 2005 23:25:46 -0000 1.2
--- BookCategory.java 2 Jan 2006 03:40:08 -0000 1.3
***************
*** 32,35 ****
--- 32,36 ----
* The copyright to this program is held by it's authors.
* @author Joe Walker [joe at eireneh dot com]
+ * @author DM Smith [dmsmith555 at yahoo dot com]
*/
public final class BookCategory implements Serializable
***************
*** 51,54 ****
--- 52,65 ----
/**
+ * Books that are indexed by day. AKA, Daily Devotions
+ */
+ public static final BookCategory DAILY_DEVOTIONS = new BookCategory("Daily Devotional"); //$NON-NLS-1$
+
+ /**
+ * Books that map words from one language to another.
+ */
+ public static final BookCategory GLOSSARY = new BookCategory("Glossaries"); //$NON-NLS-1$
+
+ /**
* Books that are not any of the above
*/
***************
*** 132,135 ****
--- 143,148 ----
DICTIONARY,
COMMENTARY,
+ DAILY_DEVOTIONS,
+ GLOSSARY,
OTHER,
};
More information about the jsword-svn
mailing list