From 1aff73f9d700d78b2323dd91755de413b4509f0e Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Mon, 7 Jun 2004 19:24:49 +0000 Subject: mgruner: futher fixes git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@24 07627401-56e2-0310-80f4-f8cd0041bdcd --- .../hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java | 9 ++--- .../WLC2OSIS/WLC2OSIS/Parse/Chapters.java | 2 +- .../hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java | 1 + .../hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Verses.java | 2 +- .../WLC2OSIS/WLC2OSIS/Translate/BookName.java | 42 ++++++++-------------- 5 files changed, 23 insertions(+), 33 deletions(-) (limited to 'modules/hebrew-wlc/WLC2OSIS') diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java index cfc7a19..2e1d5d8 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java @@ -31,6 +31,7 @@ public void start(String BookCode){ BookObject = BookName.getBookName(BookNames, BookCode) ; P.Book = BookObject.name ; + P.BookAbbrev = BookObject.abbrev ; P.TanachBookCount = P.TanachBookCount + 1 ; P.BookVerseCount = 0; P.BookChapterCount = 0 ; @@ -44,9 +45,9 @@ public void start(String BookCode){ P.VerseNumber = 0 ; P.WordNumber = 0 ; // A.w.openTag("tanach", 0) ; - A.w.openTag("div type=\"book\" osisID=\"" + BookObject.name + "\"", 1) ; - A.w.writeAttributedString("title", 2, "type=\"main\" short=\"" + BookObject.name +"\"", - BookObject.name); + A.w.openTag("div type=\"book\" osisID=\"" + BookObject.abbrev + "\"", 1) ; + A.w.writeAttributedString("title", 2, "type=\"main\" short=\"" + BookObject.abbrev +"\"", + BookObject.abbrev); // A.w.openTag("names", 2) ; // A.w.writeString("name", 3, BookObject.name ) ; @@ -75,7 +76,7 @@ public void end(){ // Note.writeNotes(A.w) ; // A.w.close() ; - System.out.println( BookObject.filename + " has been written." ) ; + System.out.println( BookObject.name + " has been written." ) ; } } //---------------------------------------------------------------------------- diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Chapters.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Chapters.java index d22deea..745dbbc 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Chapters.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Chapters.java @@ -26,7 +26,7 @@ public void start(){ P.VerseNumber = 0 ; P.WordNumber = 0 ; String num = new Integer(P.ChapterNumber).toString(); - A.w.openTag("chapter osisID=\"" + P.Book + "." + num + "\"", 2) ; + A.w.openTag("chapter osisID=\"" + P.BookAbbrev + "." + num + "\"", 2) ; // System.out.println("\nChapter " + A.F.i(P.ChapterNumber,2) + " start." ) ; } //------------------------------------------------------------------------------ diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java index c425de2..1525e37 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java @@ -35,6 +35,7 @@ public boolean MarkerWritten ; // Indicates a marker has been written // String BookName ; String Book ; +String BookAbbrev ; int Chapter ; int Verse ; diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Verses.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Verses.java index 81122ab..6dfcf6c 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Verses.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Verses.java @@ -26,7 +26,7 @@ public void start(){ String chapternum = new Integer(P.ChapterNumber).toString(); String versenum = new Integer(P.VerseNumber).toString(); - A.w.openTag("verse osisID=\""+P.Book+"."+chapternum+"."+versenum+"\"", 3) ; + A.w.openTag("verse osisID=\""+P.BookAbbrev+"."+chapternum+"."+versenum+"\"", 3) ; // A.w.openAttributedTag("v", 3, "n", ) ; // System.out.println("\nVerse " + A.F.i(P.VerseNumber,2) + " start." ) ; diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/BookName.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/BookName.java index 67b2e19..ee8dc53 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/BookName.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/BookName.java @@ -18,10 +18,9 @@ public class BookName{ public int wlcnumber = 0 ; // Book number in WLC text. public String wlcname = "" ; // Book name in WLC text. -public int number = 0 ; // Book number in JPS Tanach. -public String name = "" ; // Book name in JPS Tanach. -public String abbrev = "" ; // Book abreviation in NSRV. -public String filename = "" ; // Book filename +public int number = 0 ; // Book number. +public String name = "" ; // Book name in OSIS. +public String abbrev = "" ; // Book abreviation in OSIS. public String hebrewname = "" ; //----------------------------------------------------------------------------- @@ -30,24 +29,13 @@ public String hebrewname = "" ; public BookName( int wlcnumber, String wlcname, int number, String name, String abbrev, - String hebrewname, String filename ) { + String hebrewname) { this.wlcnumber = wlcnumber ; this.wlcname = wlcname ; this.number = number ; this.name = name ; this.abbrev = abbrev ; this.hebrewname = hebrewname ; - this.filename = filename ; - } -//----------------------------------------------------------------------------- - -// Definition for books that have names that are valid filenames. -// Their filenames are their abbrev. - -public BookName( int wlcnumber, String wlcname, - int number, String name, String abbrev, String hebrewname ) { - this(wlcnumber, wlcname, number, name, abbrev, - hebrewname, name ) ; } //----------------------------------------------------------------------------- @@ -59,7 +47,7 @@ public static BookName[] setBookNames() { BookNames[ 1] = new BookName(1, "gn", 1, "Genesis", "Gen", H.Gen ) ; BookNames[ 2] = new BookName(2, "ex", - 2, "Exodus", "Ex", H.Exod) ; + 2, "Exodus", "Exod", H.Exod) ; BookNames[ 3] = new BookName(3, "lv", 3, "Leviticus", "Lev", H.Lev) ; BookNames[ 4] = new BookName(4, "nu", @@ -72,13 +60,13 @@ public static BookName[] setBookNames() { BookNames[ 7] = new BookName(7, "ju", 7, "Judges", "Judg", H.Judg) ; BookNames[ 8] = new BookName(8, "1s", - 8, "1 Samuel", "1 Sam", H.Sam1, "Samuel 1") ; + 8, "1 Samuel", "1Sam", H.Sam1) ; BookNames[ 9] = new BookName(9, "2s", - 9, "2 Samuel", "2 Sam", H.Sam2, "Samuel 2") ; + 9, "2 Samuel", "2Sam", H.Sam2) ; BookNames[10] = new BookName(10, "1k", - 10, "1 Kings", "1 Kings", H.Kgs1, "Kings 1") ; + 10, "1 Kings", "1Kgs", H.Kgs1) ; BookNames[11] = new BookName(11, "2k", - 11, "2 Kings", "2 Kings", H.Kgs2, "Kings 2") ; + 11, "2 Kings", "2Kgs", H.Kgs2) ; BookNames[12] = new BookName(12, "is", 12, "Isaiah", "Isa", H.Isa) ; BookNames[13] = new BookName(13, "je", @@ -91,11 +79,11 @@ public static BookName[] setBookNames() { BookNames[16] = new BookName(16, "jl", 16, "Joel", "Joel", H.Joel) ; BookNames[17] = new BookName(17, "am", - 17, "Amos", "Am", H.Amos) ; + 17, "Amos", "Amos", H.Amos) ; BookNames[18] = new BookName(18, "ob", - 18, "Obadiah", "Ob", H.Obad) ; + 18, "Obadiah", "Obad", H.Obad) ; BookNames[19] = new BookName(19, "jn", - 19, "Jonah", "Jon", H.Jonah) ; + 19, "Jonah", "Jonah", H.Jonah) ; BookNames[20] = new BookName(20, "mi", 20, "Micah", "Mic", H.Micah) ; BookNames[21] = new BookName(21, "na", @@ -120,7 +108,7 @@ public static BookName[] setBookNames() { BookNames[30] = new BookName(30, "ru", 31, "Ruth", "Ruth", H.Ruth) ; BookNames[31] = new BookName(31, "ca", - 30, "The Song of Songs", "Song", H.Song, "Song of Songs") ; + 30, "The Song of Songs", "Song", H.Song) ; BookNames[32] = new BookName(32, "ec", 33, "Ecclesiastes", "Eccl", H.Eccl) ; BookNames[33] = new BookName(33, "lm", @@ -134,9 +122,9 @@ public static BookName[] setBookNames() { BookNames[37] = new BookName(37, "ne", 37, "Nehemiah", "Neh", H.Neh) ; BookNames[38] = new BookName(38, "1c", - 38, "1 Chronicles", "1 Chr", H.Chr1, "Chronicles 1") ; + 38, "1 Chronicles", "1 Chr", H.Chr1) ; BookNames[39] = new BookName(39, "2c", - 39, "2 Chronicles", "2 Chr", H.Chr2, "Chronicles 2") ; + 39, "2 Chronicles", "2 Chr", H.Chr2) ; return BookNames ; } //----------------------------------------------------------------------------- -- cgit