[sword-cvs] swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate MC.java, 1.1, 1.2 Note.java, 1.1, 1.2 Translate.java, 1.1, 1.2 UnicodeChar.java, 1.1, 1.2

sword at www.crosswire.org sword at www.crosswire.org
Thu Jun 10 05:00:22 MST 2004


Committed by: mgruner

Update of /cvs/core/swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate
In directory www:/tmp/cvs-serv14129/WLC2OSIS/Translate

Modified Files:
	MC.java Note.java Translate.java UnicodeChar.java 
Log Message:
mgruner: further updates to the WLC converter


Index: MC.java
===================================================================
RCS file: /cvs/core/swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/MC.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MC.java	4 Jun 2004 09:14:52 -0000	1.1
+++ MC.java	10 Jun 2004 12:00:20 -0000	1.2
@@ -162,8 +162,8 @@
 
         if(k == (int) ']') Characters[k] = 
             new MCO("Note", MCO.Note, ' ', ' ', 14 ) ;
-
-        }
+ 
+         }
    
 //-----------------------------------------------------------------------------
 

Index: Note.java
===================================================================
RCS file: /cvs/core/swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Note.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Note.java	4 Jun 2004 09:14:52 -0000	1.1
+++ Note.java	10 Jun 2004 12:00:20 -0000	1.2
@@ -2,7 +2,7 @@
 
 import WLC2OSIS.Utilities.* ;
 
-import java.util.Vector ;
+import java.util.Hashtable ;
 
 //==============================================================================
 /**
@@ -11,68 +11,37 @@
 //==============================================================================
 public class Note{
 
-String Code ;
-String Note ; 
-
-static Vector Notes = new Vector() ;
-
-Note(String Code, String Note){
-    this.Code = Code ;
-    this.Note = Note ;
-    }
-//-----------------------------------------------------------------------------
-
-// Writes the Notes to the XML file.
-
-public static void writeNotes(XMLWriter w) {
-    setNotes() ;
-    w.openTag("notes", 0) ;
-    for (int k=0; k < Notes.size() ; k++){
-        Note n = (Note) Notes.elementAt(k) ;
-        w.openTag("note", 1) ;
-        w.writeString("code", 2, n.Code ) ;
-        w.writeString("note", 2, n.Note ) ;
-        w.closeTag("note", 1) ;
-        }
-    w.closeTag("notes", 0) ;
-    }
-//-----------------------------------------------------------------------------
-
-// Writes the Notes to the XML file.
-
-static void setNotes() {
+static Hashtable Notes = new Hashtable();
 
-// Do this only once!
+public static void setNotes(){
 
+    // Do this only once!
     if(Notes.size() > 1) return ;
-    Notes.add(new Note("1", "BHS has been faithful to the Leningrad Codex where " 
-                          + "\nthere might be a question of the validity of the form "
-                          + "\nand we keep the same form as BHS.")) ;
-    Notes.add(new Note("2", "We have added a sop pasuq where L and BHC omit it."
-                          + "\n(The added sof pasuq often is missing from the text.)" )) ;
-    Notes.add(new Note("3", "We read or understand L differently than BHC (1983 Edition). "
-                          + "\nOften this notation indicates a typographical error in BHS.")) ;
-    Notes.add(new Note("4", "Puncta Extraordaria -- "
-                          + "\na \\u05c4 is used to mark such marks in the text"
-                          + "\nwhen they are above the line and"
-                          + "\na \\u0323 when they are below the line."));
-    Notes.add(new Note("5", "Large letter(s).")) ;
-    Notes.add(new Note("6", "Small letter(s).")) ;
-    Notes.add(new Note("7", "Suspended letter(s).")) ;
-    Notes.add(new Note("8", "Inverted nun in the text.")) ;
-    Notes.add(new Note("9", "BHS has abandoned L and we concur. " 
-                          + "\nAll of these occurrences are ketib/qere problems.")) ;
-    Notes.add(new Note("a", "Adaptations to a Qere which L and BHS, by their design, "
-                           + "do not indicate.")) ;
-    Notes.add(new Note("m", "Miscellaneous notes to the text and occasions "
-                           + "\nwhere more than one bracket category applies.")) ;
-    Notes.add(new Note("q", "We have abandoned or added a ketib/qere relative to BHS. "
-                           + "\nIn doing this we agree with L against BHS.")) ;
-    Notes.add(new Note("y", "Yathir readings in L which we have designated as Qeres "
-                           + "\nwhen both Dothan and BHS list a Qere.")) ;
+    
+    Notes.put("1", "BHS has been faithful to the Leningrad Codex where " 
+                          + "there might be a question of the validity of the form "
+                          + "and we keep the same form as BHS.") ;
+    Notes.put("2", "We have puted a sop pasuq where L and BHC omit it. "
+                          + "(The puted sof pasuq often is missing from the text.)" ) ;
+    Notes.put("3", "We read or understand L differently than BHC (1983 Edition). "
+                          + "Often this notation indicates a typographical error in BHS.") ;
+    Notes.put("4", "Puncta Extraordaria -- "
+                          + "a \\u05c4 is used to mark such marks in the text"
+                          + "when they are above the line and"
+                          + "a \\u0323 when they are below the line.");
+    Notes.put("5", "Large letter(s).") ;
+    Notes.put("6", "Small letter(s).") ;
+    Notes.put("7", "Suspended letter(s).") ;
+    Notes.put("8", "Inverted nun in the text.") ;
+    Notes.put("9", "BHS has abandoned L and we concur. " 
+                          + "All of these occurrences are ketib/qere problems.") ;
+    Notes.put("a", "Adaptations to a Qere which L and BHS, by their design, "
+                           + "do not indicate.") ;
+    Notes.put("m", "Miscellaneous notes to the text and occasions "
+                           + "where more than one bracket category applies.") ;
+    Notes.put("q", "We have abandoned or puted a ketib/qere relative to BHS. "
+                           + "In doing this we agree with L against BHS.") ;
+    Notes.put("y", "Yathir readings in L which we have designated as Qeres "
+                           + "when both Dothan and BHS list a Qere.") ;
     }
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-}
-//==============================================================================
-//==============================================================================
+}
\ No newline at end of file

Index: Translate.java
===================================================================
RCS file: /cvs/core/swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Translate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Translate.java	4 Jun 2004 09:14:52 -0000	1.1
+++ Translate.java	10 Jun 2004 12:00:20 -0000	1.2
@@ -2,6 +2,7 @@
 
 import WLC2OSIS.* ;
 import WLC2OSIS.Parse.* ;
+import WLC2OSIS.Translate.Note ;
 import WLC2OSIS.Utilities.* ;
 import Utilities.* ;
 
@@ -32,7 +33,7 @@
 //------------------------------------------------------------------------------
 
 // Translates an MC word (not qere or ketib) to a Unicode String.
-// Notes are included as <x>n</x>.
+// Notes are included as <note type="textual">text of note</x>.
 
 public String translate(String W){
     len = W.length() ;
@@ -234,10 +235,13 @@
         Type = M.Type ;
 //  Only Notes require special treatment
         if (Type == MCO.Note){
-            S = S + "<x>" + M.Value + "</x>" ;
+            S = S + "<note type=\"textual\">"+ Note.Notes.get( M.Value)+ "</note>";
             }
+	    
+    // MG              DISABLE MORPH DIVISION!!!!!!!!!!!!!!!!
+	    
         else if ((Type == MCO.MorphologicalDivision)){
-            S = S + A.MorphologicalDivisionMarker ;
+//             S = S + A.MorphologicalDivisionMarker ;
             }
         else{
             S = S + M.Value ;

Index: UnicodeChar.java
===================================================================
RCS file: /cvs/core/swordtools/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/UnicodeChar.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- UnicodeChar.java	4 Jun 2004 09:14:52 -0000	1.1
+++ UnicodeChar.java	10 Jun 2004 12:00:20 -0000	1.2
@@ -33,7 +33,7 @@
 /** List of equivalent characters represented by this Unicode character.*/
 public String Equivalents = "" ; // List of equivalents
 /** Notes provided by the Unicode group.*/
-public String Notes = "" ;       //  Additional notes.   
+ public String Notes = "" ;       //  Additional notes.   
 /** MCW characters corresponding to this Unicode character.*/
 public String MCCode = "" ;
 /** Combining group value. */



More information about the sword-cvs mailing list