[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Jun 11 13:41:07 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book
In directory www.crosswire.org:/tmp/cvs-serv27268/java/jsword/org/crosswire/jsword/book
Modified Files:
BookFilters.java BookMetaData.java OSISUtil.java
IndexStatus.java FeatureType.java
Added Files:
BookCategory.java
Removed Files:
BookType.java
Log Message:
Made showing the sidebar a default and set it to no.
Cleaned up the code to consistently use "book" to refer to "module"
Index: FeatureType.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/FeatureType.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FeatureType.java 17 May 2005 00:43:16 -0000 1.4
--- FeatureType.java 11 Jun 2005 20:41:05 -0000 1.5
***************
*** 65,69 ****
/**
! * @param name The name of the BookType
*/
private FeatureType(String name)
--- 65,69 ----
/**
! * @param name The name of the BookCategory
*/
private FeatureType(String name)
***************
*** 125,129 ****
/**
! * The name of the BookType
*/
private String name;
--- 125,129 ----
/**
! * The name of the BookCategory
*/
private String name;
Index: OSISUtil.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/OSISUtil.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** OSISUtil.java 23 May 2005 23:38:19 -0000 1.18
--- OSISUtil.java 11 Jun 2005 20:41:05 -0000 1.19
***************
*** 418,422 ****
* that "contains" the verse element.</p>
* <p>The verse element may either be
! * a container or a milestone. Sword OSIS modules differ in whether
* they provide the verse element. Most do not. The few that do are
* using the container model, but it has been proposed that milestones
--- 418,422 ----
* that "contains" the verse element.</p>
* <p>The verse element may either be
! * a container or a milestone. Sword OSIS books differ in whether
* they provide the verse element. Most do not. The few that do are
* using the container model, but it has been proposed that milestones
--- BookType.java DELETED ---
Index: IndexStatus.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/IndexStatus.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IndexStatus.java 17 May 2005 00:43:16 -0000 1.5
--- IndexStatus.java 11 Jun 2005 20:41:05 -0000 1.6
***************
*** 67,71 ****
/**
! * @param name The name of the BookType
*/
private IndexStatus(String name)
--- 67,71 ----
/**
! * @param name The name of the BookCategory
*/
private IndexStatus(String name)
***************
*** 127,131 ****
/**
! * The name of the BookType
*/
private String name;
--- 127,131 ----
/**
! * The name of the BookCategory
*/
private String name;
Index: BookFilters.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookFilters.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** BookFilters.java 17 May 2005 00:43:16 -0000 1.13
--- BookFilters.java 11 Jun 2005 20:41:05 -0000 1.14
***************
*** 82,86 ****
public boolean test(Book book)
{
! return book.getType().equals(BookType.BIBLE);
}
}
--- 82,86 ----
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.BIBLE);
}
}
***************
*** 106,110 ****
public boolean test(Book book)
{
! return book.getType().equals(BookType.DICTIONARY);
}
}
--- 106,110 ----
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.DICTIONARY);
}
}
***************
*** 130,134 ****
public boolean test(Book book)
{
! return book.getType().equals(BookType.COMMENTARY);
}
}
--- 130,134 ----
public boolean test(Book book)
{
! return book.getType().equals(BookCategory.COMMENTARY);
}
}
Index: BookMetaData.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/BookMetaData.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** BookMetaData.java 17 May 2005 00:43:16 -0000 1.29
--- BookMetaData.java 11 Jun 2005 20:41:05 -0000 1.30
***************
*** 61,65 ****
* @return The type of book
*/
! BookType getType();
/**
--- 61,65 ----
* @return The type of book
*/
! BookCategory getType();
/**
--- NEW FILE: BookCategory.java ---
/**
* Distribution License:
* JSword is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2 as published by
* the Free Software Foundation. This program is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* The License is available on the internet at:
* http://www.gnu.org/copyleft/gpl.html
* or by writing to:
* Free Software Foundation, Inc.
* 59 Temple Place - Suite 330
* Boston, MA 02111-1307, USA
*
* Copyright: 2005
* The copyright to this program is held by it's authors.
*
* ID: $Id: BookCategory.java,v 1.1 2005/06/11 20:41:05 dmsmith Exp $
*/
package org.crosswire.jsword.book;
import java.io.Serializable;
/**
* An Enumeration of the possible types of Book.
*
* <p>NOTE(joe): consider giving each a number (1,2,4,8) and allowing combinations
*
* @see gnu.gpl.License for license details.
* The copyright to this program is held by it's authors.
* @author Joe Walker [joe at eireneh dot com]
*/
public final class BookCategory implements Serializable
{
/**
* Books that are Bibles
*/
public static final BookCategory BIBLE = new BookCategory("Bible"); //$NON-NLS-1$
/**
* Books that are Dictionaries
*/
public static final BookCategory DICTIONARY = new BookCategory("Dictionary"); //$NON-NLS-1$
/**
* Books that are Commentaries
*/
public static final BookCategory COMMENTARY = new BookCategory("Commentary"); //$NON-NLS-1$
/**
* Books that are not any of the above
*/
public static final BookCategory OTHER = new BookCategory("Other"); //$NON-NLS-1$
/**
* @param name The name of the BookCategory
*/
private BookCategory(String name)
{
this.name = name;
}
/**
* Lookup method to convert from a String
*/
public static BookCategory fromString(String name)
{
for (int i = 0; i < VALUES.length; i++)
{
BookCategory o = VALUES[i];
if (o.name.equalsIgnoreCase(name))
{
return o;
}
}
return OTHER;
}
/**
* Lookup method to convert from an integer
*/
public static BookCategory fromInteger(int i)
{
return VALUES[i];
}
/**
* Prevent subclasses from overriding canonical identity based Object methods
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object o)
{
return super.equals(o);
}
/**
* Prevent subclasses from overriding canonical identity based Object methods
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
return super.hashCode();
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString()
{
return name;
}
/**
* The name of the BookCategory
*/
private String name;
// Support for serialization
private static int nextObj;
private final int obj = nextObj++;
Object readResolve()
{
return VALUES[obj];
}
private static final BookCategory[] VALUES =
{
BIBLE,
DICTIONARY,
COMMENTARY,
OTHER,
};
/**
* Serialization ID
*/
private static final long serialVersionUID = 3256727260177708345L;
}
More information about the jsword-svn
mailing list