Source code: com/eireneh/bible/passage/PassageConstants.java
1
2 package com.eireneh.bible.passage;
3
4 /**
5 * Various constants used by the concrete Verse classes. This class is
6 * intended to be implemented to get easy access to the constants.
7 *
8 * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
9 * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
10 * Distribution Licence:<br />
11 * Project B is free software; you can redistribute it
12 * and/or modify it under the terms of the GNU General Public License,
13 * version 2 as published by the Free Software Foundation.<br />
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.<br />
18 * The License is available on the internet
19 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
20 * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21 * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
22 * The copyright to this program is held by it's authors.
23 * </font></td></tr></table>
24 * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
25 * @see docs.Licence
26 * @author Joe Walker
27 * @version D9.I9.T5
28 * @stereotype description
29 */
30 public interface PassageConstants
31 {
32 /** A word is lower case if all the letters lower case, or if the word is blank - i.e. it is a default */
33 public static final int CASE_LOWER = 0;
34
35 /** A word is sentance case if the first letter is upper case, and all subsequent letters are lower case */
36 public static final int CASE_SENTANCE = 1;
37
38 /** A word is upper case if all the letters upper case */
39 public static final int CASE_UPPER = 2;
40
41 /** A word is mixed case if it does not conform to any of the above */
42 public static final int CASE_MIXED = 3;
43
44 /** A word is mixed case if it does not conform to any of the above */
45 public static final String[] CASES = { "lower", "Sentance", "UPPER", "MIXed", };
46
47
48 /** Don't restrict a blurring at all */
49 public static final int RESTRICT_NONE = 0;
50
51 /** Stop blurring at the edge of a book */
52 public static final int RESTRICT_BOOK = 1;
53
54 /** Stop blurring at the edge of a chapter */
55 public static final int RESTRICT_CHAPTER = 2;
56
57 /** Stop blurring at the edge of a chapter */
58 public static final String[] RESTRICTIONS = { "None", "Book", "Chapter", };
59
60
61 /** The passage was specified to a exactly, eg Gen 1:1 */
62 public static final int ACCURACY_BOOK_VERSE = 0;
63
64 /** The passage was specified to a book and chapter (no verse), eg Gen 1 */
65 public static final int ACCURACY_BOOK_CHAPTER = 1;
66
67 /** The passage was specified to a book only (no chapter or verse), eg Gen */
68 public static final int ACCURACY_BOOK_ONLY = 2;
69
70 /** The passage was specified to a chapter and verse (no book), eg 1:1 */
71 public static final int ACCURACY_CHAPTER_VERSE = 3;
72
73 // The is no such thing as ACCURACY_CHAPTER_ONLY because that can not be distinguished
74 // From ACCURACY_VERSE_ONLY and has no use from a users point of view.
75
76 /** The passage was specified to a verse (no cahpter or book), eg 1 */
77 public static final int ACCURACY_VERSE_ONLY = 4;
78
79 /** The text was empty */
80 public static final int ACCURACY_NONE = 5;
81
82
83 /** What characters can we use to separate parts to a verse */
84 public static final String VERSE_ALLOWED_DELIMS = " :.";
85
86 /** What characters should we use to separate the book from the chapter */
87 public static final String VERSE_PREF_DELIM1 = " ";
88
89 /** What characters should we use to separate the chapter from the verse */
90 public static final String VERSE_PREF_DELIM2 = ":";
91
92 /** Characters that are used to indicate end of verse/chapter, part 1 */
93 public static final String VERSE_END_MARK1 = "$";
94
95 /** Characters that are used to indicate end of verse/chapter, part 2 */
96 public static final String VERSE_END_MARK2 = "ff";
97
98 /** The delimitters that can be used to prefix a book number */
99 public static final String[] VERSE_NUMERIC_BOOK = { "#" };
100
101 /** What characters can we use to separate the 2 parts to a VerseRanges */
102 public static final String RANGE_ALLOWED_DELIMS = "-";
103
104 /** What characters should we use to separate VerseRange parts */
105 public static final String RANGE_PREF_DELIM = "-";
106
107 /** What characters can we use to separate VerseRanges in a Passage */
108 public static final String REF_ALLOWED_DELIMS = ",;\n\r\t";
109
110 /** What characters should we use to separate VerseRanges in a Passage */
111 public static final String REF_PREF_DELIM = ", ";
112 }