diff software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java @ 20:7d6d969b10cf

little corrections
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Wed, 14 Dec 2011 12:48:43 +0100
parents 4a3641ae14d2
children e845310098ba
line wrap: on
line diff
--- a/software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java	Wed Nov 09 15:32:05 2011 +0100
+++ b/software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java	Wed Dec 14 12:48:43 2011 +0100
@@ -140,6 +140,14 @@
     }
   }
 
+  public LexiconEntry getEntry(String lexEntryName) {
+    LexiconEntry retEntry = null;
+    if (entries == null) {
+      entries.get(lexEntryName);  
+    }
+    return retEntry;
+  }
+
   /*
    * without lexicon entries (non-Javadoc)
    * @see java.lang.Object#clone()
@@ -157,6 +165,7 @@
     String result = "";
     result = result + "<dictionary>";
     result = result + "<name>" + name + "</name>";
+    result = result + "<language>" + sourceLang + "</language>";
     result = result + "<description>" + description + "</description>";
     result = result + "<entries>";
     for (int i=0; i<entries.size(); i++) {
@@ -195,4 +204,21 @@
     return result;
   }
 
+  public String toXmlStringCompact() {
+    String result = "";
+    result = result + "<dictionary>";
+    result = result + "<name>" + name + "</name>";
+    result = result + "<language>" + sourceLang + "</language>";
+    result = result + "<description>" + description + "</description>";
+    result = result + "<entries>";
+    for (int i=0; i<entries.size(); i++) {
+      result = result + "<entry>";
+      LexiconEntry entry = getEntries().get(i);
+      result = result + "<form>" + entry.getFormName() + "</form>";
+      result = result + "</entry>";
+    }
+    result = result + "</entries>";
+    result = result + "</dictionary>";
+    return result;
+  }
 }