Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.versification
Class SectionNames

    java.lang.Object
      org.crosswire.jsword.versification.SectionNames

    public final class SectionNames

extends Object

SectionNames deals with traditional sections of the Bible.

Author:
  Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`static byte` | `GOSPELS_AND_ACTS`
`static byte` | `HISTORY`
`static byte` | `LETTERS`
`static byte` | `MAJOR_PROPHETS`
`static byte` | `MINOR_PROPHETS`
`static byte` | `PENTATEUCH` Handy section finder.
`static byte` | `POETRY`
`static byte` | `REVELATION`
`private static String` | `SECTION_KEY`
`private String[]` | `sections` Standard names for the sections
`private static int` | `SECTIONS_IN_BIBLE` Constant for the number of sections in the Bible

Constructor Summary
`SectionNames()` Create a SectionNames object

Method Summary
`static int` | `getSection(int book)` What section is this book a part of?
`String` | `getSectionName(int section)` Get the full 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.
`static boolean` | `isGospel(int book)` Is this book part of the Gospels?
`static boolean` | `isGospelOrActs(int book)` Is this book part of the Gospels or Acts?
`static boolean` | `isHistory(int book)` Is this book part of the OT History?
`static boolean` | `isLetter(int book)` Is this book part of the letters?
`static boolean` | `isMajorProphet(int book)` Is this book part of the major prophets?
`static boolean` | `isMinorProphet(int book)` Is this book part of the minor prophets?
`static boolean` | `isPentateuch(int book)` Is this book part of the Pentateuch?
`static boolean` | `isPoetry(int book)` Is this book part of the OT History?

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SECTION_KEY

    private static final String SECTION_KEY

See Also:
  Constant Field Values

### PENTATEUCH

    public static final byte PENTATEUCH

  Handy section finder. There is a bit of moderately bad programming here because org.crosswire.biblemapper.sw*ng.GroupVerseColor uses these numbers as an index into an array, so we shouldn't change these numbers without fixing that, however I don't imagine that this section could ever change without breaking GroupVerseColor anyway so I don't see it as a big problem.

  See Also:
    Constant Field Values

### HISTORY

    public static final byte HISTORY

See Also:
  Constant Field Values

### POETRY

    public static final byte POETRY

See Also:
  Constant Field Values

### MAJOR_PROPHETS

    public static final byte MAJOR_PROPHETS

See Also:
  Constant Field Values

### MINOR_PROPHETS

    public static final byte MINOR_PROPHETS

See Also:
  Constant Field Values

### GOSPELS_AND_ACTS

    public static final byte GOSPELS_AND_ACTS

See Also:
  Constant Field Values

### LETTERS

    public static final byte LETTERS

See Also:
  Constant Field Values

### REVELATION

    public static final byte REVELATION

See Also:
  Constant Field Values

### sections

    private String[] sections

  Standard names for the sections

### SECTIONS_IN_BIBLE

    private static final int SECTIONS_IN_BIBLE

  Constant for the number of sections in the Bible

  See Also:
    Constant Field Values

Constructor Detail

### SectionNames

    public SectionNames()

  Create a SectionNames object

Method Detail

### isPentateuch

    public static boolean isPentateuch(int book)

  Is this book part of the Pentateuch?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isHistory

    public static boolean isHistory(int book)

  Is this book part of the OT History?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isPoetry

    public static boolean isPoetry(int book)

  Is this book part of the OT History?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isMajorProphet

    public static boolean isMajorProphet(int book)

  Is this book part of the major prophets?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isMinorProphet

    public static boolean isMinorProphet(int book)

  Is this book part of the minor prophets?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isGospel

    public static boolean isGospel(int book)

  Is this book part of the Gospels?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isGospelOrActs

    public static boolean isGospelOrActs(int book)

  Is this book part of the Gospels or Acts?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### isLetter

    public static boolean isLetter(int book)

  Is this book part of the letters?

  Parameters:
    `book` - The book to test
  Returns:
    True if this book is a part of this section

### getSection

    public static int getSection(int book)

  What section is this book a part of?

  Parameters:
    `book` - The book to test
  Returns:
    True The section

### getSectionName

    public String getSectionName(int section)
                          throws NoSuchVerseException

  Get the full name of a book (e.g. "Genesis"). Altered by the case setting (see setBookCase())

  Parameters:
    `section` - The book number (1-66)
  Returns:
    The full name of the book
  Throws:
    `NoSuchVerseException` - If the book number is not valid

### initialize

    private void initialize()

  Load up the resources for Bible book and section names, and cache the upper and lower versions of them.

### getString

    private String getString(ResourceBundle resources,
                             String key)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD