|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.versification.BibleNames
public final class BibleNames
BibleNames is a static class that deals with Book name lookup conversions. We start counting at 1 for books (so Genesis=1, Revelation=66). However internally books start counting at 0 and go up to 65.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
static byte |
ACTS
|
private static String |
ALT_KEY
|
private String[][] |
altBooks
Alternative shortened names for the book of the Bible, expected to be normalized |
private Map |
altBooksMap
Alternative shortened names for the book of the Bible, normalized, generated at runtime |
static byte |
AMOS
|
static byte |
CHRONICLES1
|
static byte |
CHRONICLES2
|
static byte |
COLOSSIANS
|
static byte |
CORINTHIANS1
|
static byte |
CORINTHIANS2
|
static byte |
DANIEL
|
static byte |
DEUTERONOMY
|
static byte |
ECCLESIASTES
|
static byte |
EPHESIANS
|
static byte |
ESTHER
|
static byte |
EXODUS
|
static byte |
EZEKIEL
|
static byte |
EZRA
|
private static String |
FULL_KEY
|
private String[] |
fullBooks
The full names of the book of the Bible, in mixed case |
private Map |
fullBooksMap
The full names of the book of the Bible, normalized, generated at runtime |
private String[] |
fullBooksSearch
The full names of the book of the Bible, normalized, generated at runtime |
static byte |
GALATIANS
|
static byte |
GENESIS
Handy book finder |
static byte |
HABAKKUK
|
static byte |
HAGGAI
|
static byte |
HEBREWS
|
static byte |
HOSEA
|
static byte |
ISAIAH
|
static byte |
JAMES
|
static byte |
JEREMIAH
|
static byte |
JOB
|
static byte |
JOEL
|
static byte |
JOHN
|
static byte |
JOHN1
|
static byte |
JOHN2
|
static byte |
JOHN3
|
static byte |
JONAH
|
static byte |
JOSHUA
|
static byte |
JUDE
|
static byte |
JUDGES
|
static byte |
KINGS1
|
static byte |
KINGS2
|
static byte |
LAMENTATIONS
|
static byte |
LEVITICUS
|
private Locale |
locale
The locale for the Bible Names |
static byte |
LUKE
|
static byte |
MALACHI
|
static byte |
MARK
|
static byte |
MATTHEW
|
static byte |
MICAH
|
static byte |
NAHUM
|
static byte |
NEHEMIAH
|
private static Pattern |
normPattern
remove spaces and punctuation in Bible Names |
static byte |
NUMBERS
|
static byte |
OBADIAH
|
static byte |
PETER1
|
static byte |
PETER2
|
static byte |
PHILEMON
|
static byte |
PHILIPPIANS
|
static byte |
PROVERBS
|
static byte |
PSALMS
|
static byte |
REVELATION
|
static byte |
ROMANS
|
static byte |
RUTH
|
static byte |
SAMUEL1
|
static byte |
SAMUEL2
|
private static String |
SHORT_KEY
|
private String[] |
shortBooks
Standard shortened names for the book of the Bible, in mixed case |
private Map |
shortBooksMap
Standard shortened names for the book of the Bible, normalized, generated at runtime. |
private String[] |
shortBooksSearch
Standard shortened names for the book of the Bible, normalized, generated at runtime. |
static byte |
SONGOFSOLOMON
|
static byte |
THESSALONIANS1
|
static byte |
THESSALONIANS2
|
static byte |
TIMOTHY1
|
static byte |
TIMOTHY2
|
static byte |
TITUS
|
static byte |
ZECHARIAH
|
static byte |
ZEPHANIAH
|
Constructor Summary | |
---|---|
BibleNames(Locale locale)
Ensure that we can not be instantiated |
Method Summary | |
---|---|
String |
getBookName(int book)
Get the preferred name of a book. |
int |
getBookNumber(String find)
Get number of a book from its name. |
String |
getLongBookName(int book)
Get the full name of a book (e.g. |
String |
getShortBookName(int book)
Get the short name of a book (e.g. |
private String |
getString(ResourceBundle resources,
String key)
|
private void |
initialize()
Load up the resources for Bible book and section names, and cache the upper and lower versions of them. |
boolean |
isBookName(String find)
Is the given string a valid book name. |
private String |
normalize(String str)
Normalize by stripping punctuation and whitespace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String FULL_KEY
private static final String SHORT_KEY
private static final String ALT_KEY
public static final byte GENESIS
public static final byte EXODUS
public static final byte LEVITICUS
public static final byte NUMBERS
public static final byte DEUTERONOMY
public static final byte JOSHUA
public static final byte JUDGES
public static final byte RUTH
public static final byte SAMUEL1
public static final byte SAMUEL2
public static final byte KINGS1
public static final byte KINGS2
public static final byte CHRONICLES1
public static final byte CHRONICLES2
public static final byte EZRA
public static final byte NEHEMIAH
public static final byte ESTHER
public static final byte JOB
public static final byte PSALMS
public static final byte PROVERBS
public static final byte ECCLESIASTES
public static final byte SONGOFSOLOMON
public static final byte ISAIAH
public static final byte JEREMIAH
public static final byte LAMENTATIONS
public static final byte EZEKIEL
public static final byte DANIEL
public static final byte HOSEA
public static final byte JOEL
public static final byte AMOS
public static final byte OBADIAH
public static final byte JONAH
public static final byte MICAH
public static final byte NAHUM
public static final byte HABAKKUK
public static final byte ZEPHANIAH
public static final byte HAGGAI
public static final byte ZECHARIAH
public static final byte MALACHI
public static final byte MATTHEW
public static final byte MARK
public static final byte LUKE
public static final byte JOHN
public static final byte ACTS
public static final byte ROMANS
public static final byte CORINTHIANS1
public static final byte CORINTHIANS2
public static final byte GALATIANS
public static final byte EPHESIANS
public static final byte PHILIPPIANS
public static final byte COLOSSIANS
public static final byte THESSALONIANS1
public static final byte THESSALONIANS2
public static final byte TIMOTHY1
public static final byte TIMOTHY2
public static final byte TITUS
public static final byte PHILEMON
public static final byte HEBREWS
public static final byte JAMES
public static final byte PETER1
public static final byte PETER2
public static final byte JOHN1
public static final byte JOHN2
public static final byte JOHN3
public static final byte JUDE
public static final byte REVELATION
private static Pattern normPattern
private Locale locale
private String[] fullBooks
private String[] fullBooksSearch
private Map fullBooksMap
private String[] shortBooks
private String[] shortBooksSearch
private Map shortBooksMap
private String[][] altBooks
private Map altBooksMap
Constructor Detail |
---|
public BibleNames(Locale locale)
Method Detail |
---|
public String getBookName(int book) throws NoSuchVerseException
book
- The book number (1-66)
NoSuchVerseException
- If the book number is not validpublic String getLongBookName(int book) throws NoSuchVerseException
book
- The book number (1-66)
NoSuchVerseException
- If the book number is not validpublic String getShortBookName(int book) throws NoSuchVerseException
book
- The book number (1-66)
NoSuchVerseException
- If the book number is not validpublic int getBookNumber(String find)
find
- The string to identify
public boolean isBookName(String find)
find
- The string to identify
private String normalize(String str)
str
- the string to normalize
private void initialize()
private String getString(ResourceBundle resources, String key)
|
Copyright ยจ 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |