package yuku.alkitabconverter.util;

public class UsfmBookName {
	public static final String TAG = UsfmBookName.class.getSimpleName();

	static String[] bookNames = "GEN EXO LEV NUM DEU JOS JDG RUT 1SA 2SA 1KI 2KI 1CH 2CH EZR NEH EST JOB PSA PRO ECC SNG ISA JER LAM EZK DAN HOS JOL AMO OBA JON MIC NAM HAB ZEP HAG ZEC MAL MAT MRK LUK JHN ACT ROM 1CO 2CO GAL EPH PHP COL 1TH 2TH 1TI 2TI TIT PHM HEB JAS 1PE 2PE 1JN 2JN 3JN JUD REV".split(" ");
	
	public static int toBookId(String name) {
		for (int i = 0; i < bookNames.length; i++) {
			if (name.equals(bookNames[i])) {
				return i;
			}
		}
		throw new RuntimeException("unknown usfm book name: " + name);
	}
}

@@ -158,16 +158,17 @@
 Names = 
+(
 %22GEN EXO
@@ -424,16 +424,623 @@
 JUD REV%22
+ +%0A%09%09%22 1ES%22 + // book_0 66%0A%09%09%22 2ES%22 + // book_0 67%0A%09%09%22 TOB%22 + // book_0 68%0A%09%09%22 JDT%22 + // book_0 69%0A%09%09%22 1MA%22 + // book_0 70%0A%09%09%22 2MA%22 + // book_0 71%0A%09%09%22 3MA%22 + // book_0 72%0A%09%09%22 4MA%22 + // book_0 73%0A%09%09%22 X74%22 + // book_0 74 -- not implemented%0A%09%09%22 X75%22 + // book_0 75 -- not implemented%0A%09%09%22 WIS%22 + // book_0 76%0A%09%09%22 SIR%22 + // book_0 77%0A%09%09%22 X78%22 + // book_0 78 -- not implemented%0A%09%09%22 LJE%22 + // book_0 79%0A%09%09%22 BAR%22 + // book_0 80%0A%09%09%22 SUS%22 + // book_0 81%0A%09%09%22 S3Y%22 + // book_0 82%0A%09%09%22 BEL%22 + // book_0 83%0A%09%09%22 MAN%22 + // book_0 84%0A%09%09%22 ESG%22 + // book_0 85%0A%09%09%22 PS2%22 + // book_0 86%0A%09%09%22 X87%22 // book_0 87 -- not implemented%0A%09)
 .split(%22

add support for apocrypha books