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