1   /**
2    * Distribution License:
3    * JSword is free software; you can redistribute it and/or modify it under
4    * the terms of the GNU Lesser General Public License, version 2.1 as published by
5    * the Free Software Foundation. This program is distributed in the hope
6    * that it will be useful, but WITHOUT ANY WARRANTY; without even the
7    * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8    * See the GNU Lesser General Public License for more details.
9    *
10   * The License is available on the internet at:
11   *       http://www.gnu.org/copyleft/lgpl.html
12   * or by writing to:
13   *      Free Software Foundation, Inc.
14   *      59 Temple Place - Suite 330
15   *      Boston, MA 02111-1307, USA
16   *
17   * Copyright: 2012
18   *     The copyright to this program is held by it's authors.
19   *
20   * ID: $Id: SystemLeningrad.java 2230 2012-02-08 00:00:10Z dmsmith $
21   */
22  package org.crosswire.jsword.versification.system;
23  
24  import org.crosswire.jsword.versification.BibleBook;
25  import org.crosswire.jsword.versification.Versification;
26  
27  /**
28   * The Leningrad Codex versification differs from the Masoretic Text (MT)
29   * versification only in the placement of 1 and 2 Chronicles.
30   * The Leningrad Codex places them between Malachi and Psalms,
31   * while the Masoretic Text puts it after Nehemiah at the end of the
32   * Old Testament.
33   *
34   * @see gnu.lgpl.License for license details.<br>
35   *      The copyright to this program is held by it's authors.
36   * @author DM Smith [dmsmith555 at yahoo dot com]
37   */
38  public class SystemLeningrad extends Versification {
39      /**
40       * Build the "Leningrad" Versification.
41       */
42      /* protected */ SystemLeningrad() {
43          super(V11N_NAME, BOOKS_OT, BOOKS_NT, LAST_VERSE_OT, LAST_VERSE_NT);
44      }
45  
46      public static final String V11N_NAME = "Leningrad";
47  
48      /* protected */ static final BibleBook[] BOOKS_NT = SystemDefault.BOOKS_NONE;
49      /* protected */ static final int[][] LAST_VERSE_NT = SystemDefault.LAST_VERSE_NONE;
50  
51      /* protected */ static final BibleBook[] BOOKS_OT =
52      {
53          BibleBook.GEN,
54          BibleBook.EXOD,
55          BibleBook.LEV,
56          BibleBook.NUM,
57          BibleBook.DEUT,
58          BibleBook.JOSH,
59          BibleBook.JUDG,
60          BibleBook.SAM1,
61          BibleBook.SAM2,
62          BibleBook.KGS1,
63          BibleBook.KGS2,
64          BibleBook.ISA,
65          BibleBook.JER,
66          BibleBook.EZEK,
67          BibleBook.HOS,
68          BibleBook.JOEL,
69          BibleBook.AMOS,
70          BibleBook.OBAD,
71          BibleBook.JONAH,
72          BibleBook.MIC,
73          BibleBook.NAH,
74          BibleBook.HAB,
75          BibleBook.ZEPH,
76          BibleBook.HAG,
77          BibleBook.ZECH,
78          BibleBook.MAL,
79          BibleBook.CHR1,
80          BibleBook.CHR2,
81          BibleBook.PS,
82          BibleBook.JOB,
83          BibleBook.PROV,
84          BibleBook.RUTH,
85          BibleBook.SONG,
86          BibleBook.ECCL,
87          BibleBook.LAM,
88          BibleBook.ESTH,
89          BibleBook.DAN,
90          BibleBook.EZRA,
91          BibleBook.NEH,
92      };
93  
94      /* protected */ static final int[][] LAST_VERSE_OT =
95      {
96          // Genesis
97          {
98                 31,    25,    24,    26,    32,    22,    24,    22,    29,
99                 32,    32,    20,    18,    24,    21,    16,    27,    33,    38,
100                18,    34,    24,    20,    67,    34,    35,    46,    22,    35,
101                43,    54,    33,    20,    31,    29,    43,    36,    30,    23,
102                23,    57,    38,    34,    34,    28,    34,    31,    22,    33,
103                26,
104         },
105         // Exodus
106         {
107                22,    25,    22,    31,    23,    30,    29,    28,    35,
108                29,    10,    51,    22,    31,    27,    36,    16,    27,    25,
109                26,    37,    30,    33,    18,    40,    37,    21,    43,    46,
110                38,    18,    35,    23,    35,    35,    38,    29,    31,    43,
111                38,
112         },
113         // Leviticus
114         {
115                17,    16,    17,    35,    26,    23,    38,    36,    24,
116                20,    47,     8,    59,    57,    33,    34,    16,    30,    37,
117                27,    24,    33,    44,    23,    55,    46,    34,
118         },
119         // Numbers
120         {
121                54,    34,    51,    49,    31,    27,    89,    26,    23,
122                36,    35,    16,    33,    45,    41,    35,    28,    32,    22,
123                29,    35,    41,    30,    25,    19,    65,    23,    31,    39,
124                17,    54,    42,    56,    29,    34,    13,
125         },
126         // Deuteronomy
127         {
128                46,    37,    29,    49,    33,    25,    26,    20,    29,
129                22,    32,    31,    19,    29,    23,    22,    20,    22,    21,
130                20,    23,    29,    26,    22,    19,    19,    26,    69,    28,
131                20,    30,    52,    29,    12,
132         },
133         // Joshua
134         {
135                18,    24,    17,    24,    15,    27,    26,    35,    27,
136                43,    23,    24,    33,    15,    63,    10,    18,    28,    51,
137                 9,    45,    34,    16,    33,
138         },
139         // Judges
140         {
141                36,    23,    31,    24,    31,    40,    25,    35,    57,
142                18,    40,    15,    25,    20,    20,    31,    13,    31,    30,
143                48,    25,
144         },
145         // I Samuel
146         {
147                28,    36,    21,    22,    12,    21,    17,    22,    27,
148                27,    15,    25,    23,    52,    35,    23,    58,    30,    24,
149                42,    16,    23,    28,    23,    44,    25,    12,    25,    11,
150                31,    13,
151         },
152         // II Samuel
153         {
154                27,    32,    39,    12,    25,    23,    29,    18,    13,
155                19,    27,    31,    39,    33,    37,    23,    29,    32,    44,
156                26,    22,    51,    39,    25,
157         },
158         // I Kings
159         {
160                53,    46,    28,    20,    32,    38,    51,    66,    28,
161                29,    43,    33,    34,    31,    34,    34,    24,    46,    21,
162                43,    29,    54,
163         },
164         // II Kings
165         {
166                18,    25,    27,    44,    27,    33,    20,    29,    37,
167                36,    20,    22,    25,    29,    38,    20,    41,    37,    37,
168                21,    26,    20,    37,    20,    30,
169         },
170         // Isaiah
171         {
172                31,    22,    26,     6,    30,    13,    25,    23,    20,
173                34,    16,     6,    22,    32,     9,    14,    14,     7,    25,
174                 6,    17,    25,    18,    23,    12,    21,    13,    29,    24,
175                33,     9,    20,    24,    17,    10,    22,    38,    22,     8,
176                31,    29,    25,    28,    28,    25,    13,    15,    22,    26,
177                11,    23,    15,    12,    17,    13,    12,    21,    14,    21,
178                22,    11,    12,    19,    11,    25,    24,
179         },
180         // Jeremiah
181         {
182                19,    37,    25,    31,    31,    30,    34,    23,    25,
183                25,    23,    17,    27,    22,    21,    21,    27,    23,    15,
184                18,    14,    30,    40,    10,    38,    24,    22,    17,    32,
185                24,    40,    44,    26,    22,    19,    32,    21,    28,    18,
186                16,    18,    22,    13,    30,     5,    28,     7,    47,    39,
187                46,    64,    34,
188         },
189         // Ezekiel
190         {
191                28,    10,    27,    17,    17,    14,    27,    18,    11,
192                22,    25,    28,    23,    23,     8,    63,    24,    32,    14,
193                44,    37,    31,    49,    27,    17,    21,    36,    26,    21,
194                26,    18,    32,    33,    31,    15,    38,    28,    23,    29,
195                49,    26,    20,    27,    31,    25,    24,    23,    35,
196         },
197         // Hosea
198         {
199                 9,    25,     5,    19,    15,    11,    16,    14,    17,
200                15,    11,    15,    15,    10,
201         },
202         // Joel
203         {
204                20,    27,     5,    21,
205         },
206         // Amos
207         {
208                15,    16,    15,    13,    27,    14,    17,    14,    15,
209         },
210         // Obadiah
211         {
212                21,
213         },
214         // Jonah
215         {
216                16,    11,    10,    11,
217         },
218         // Micah
219         {
220                16,    13,    12,    14,    14,    16,    20,
221         },
222         // Nahum
223         {
224                14,    14,    19,
225         },
226         // Habakkuk
227         {
228                17,    20,    19,
229         },
230         // Zephaniah
231         {
232                18,    15,    20,
233         },
234         // Haggai
235         {
236                15,    23,
237         },
238         // Zechariah
239         {
240                17,    17,    10,    14,    11,    15,    14,    23,    17,
241                12,    17,    14,     9,    21,
242         },
243         // Malachi
244         {
245                14,    17,    24,
246         },
247         // I Chronicles
248         {
249                54,    55,    24,    43,    41,    66,    40,    40,    44,
250                14,    47,    41,    14,    17,    29,    43,    27,    17,    19,
251                 8,    30,    19,    32,    31,    31,    32,    34,    21,    30,
252         },
253         // II Chronicles
254         {
255                18,    17,    17,    22,    14,    42,    22,    18,    31,
256                19,    23,    16,    23,    14,    19,    14,    19,    34,    11,
257                37,    20,    12,    21,    27,    28,    23,     9,    27,    36,
258                27,    21,    33,    25,    33,    27,    23,
259         },
260         // Psalms
261         {
262                 6,    12,     9,     9,    13,    11,    18,    10,    21,
263                18,     7,     9,     6,     7,     5,    11,    15,    51,    15,
264                10,    14,    32,     6,    10,    22,    12,    14,     9,    11,
265                13,    25,    11,    22,    23,    28,    13,    40,    23,    14,
266                18,    14,    12,     5,    27,    18,    12,    10,    15,    21,
267                23,    21,    11,     7,     9,    24,    14,    12,    12,    18,
268                14,     9,    13,    12,    11,    14,    20,     8,    36,    37,
269                 6,    24,    20,    28,    23,    11,    13,    21,    72,    13,
270                20,    17,     8,    19,    13,    14,    17,     7,    19,    53,
271                17,    16,    16,     5,    23,    11,    13,    12,     9,     9,
272                 5,     8,    29,    22,    35,    45,    48,    43,    14,    31,
273                 7,    10,    10,     9,     8,    18,    19,     2,    29,   176,
274                 7,     8,     9,     4,     8,     5,     6,     5,     6,     8,
275                 8,     3,    18,     3,     3,    21,    26,     9,     8,    24,
276                14,    10,     8,    12,    15,    21,    10,    20,    14,     9,
277                 6,
278         },
279         // Job
280         {
281                22,    13,    26,    21,    27,    30,    21,    22,    35,
282                22,    20,    25,    28,    22,    35,    22,    16,    21,    29,
283                29,    34,    30,    17,    25,     6,    14,    23,    28,    25,
284                31,    40,    22,    33,    37,    16,    33,    24,    41,    30,
285                32,    26,    17,
286         },
287         // Proverbs
288         {
289                33,    22,    35,    27,    23,    35,    27,    36,    18,
290                32,    31,    28,    25,    35,    33,    33,    28,    24,    29,
291                30,    31,    29,    35,    34,    28,    28,    27,    28,    27,
292                33,    31,
293         },
294         // Ruth
295         {
296                22,    23,    18,    22,
297         },
298         // Song of Solomon
299         {
300                17,    17,    11,    16,    16,    12,    14,    14,
301         },
302         // Ecclesiastes
303         {
304                18,    26,    22,    17,    19,    12,    29,    17,    18,
305                20,    10,    14,
306         },
307         // Lamentations
308         {
309                22,    22,    66,    22,    22,
310         },
311         // Esther
312         {
313                22,    23,    15,    17,    14,    14,    10,    17,    32,
314                 3,
315         },
316         // Daniel
317         {
318                21,    49,    33,    34,    30,    29,    28,    27,    27,
319                21,    45,    13,
320         },
321         // Ezra
322         {
323                11,    70,    13,    24,    17,    22,    28,    36,    15,
324                44,
325         },
326         // Nehemiah
327         {
328                11,    20,    38,    17,    19,    19,    72,    18,    37,
329                40,    36,    47,    31,
330         },
331     };
332 
333     /**
334      * Serialization ID
335      */
336     private static final long serialVersionUID = -1483944788413812511L;
337 }
338