diff software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java @ 23:e845310098ba

diverse Korrekturen
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 27 Nov 2012 12:35:19 +0100
parents 7d6d969b10cf
children
line wrap: on
line diff
--- a/software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java	Wed Dec 14 13:57:09 2011 +0100
+++ b/software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/dict/app/Lexicon.java	Tue Nov 27 12:35:19 2012 +0100
@@ -10,6 +10,7 @@
 import de.mpg.mpiwg.berlin.mpdl.exception.ApplicationException;
 import de.mpg.mpiwg.berlin.mpdl.lt.general.Language;
 import de.mpg.mpiwg.berlin.mpdl.lt.text.transcode.Transcoder;
+import de.mpg.mpiwg.berlin.mpdl.util.StringUtils;
 
 public class Lexicon implements Comparable<Lexicon> {
   private String name;
@@ -27,7 +28,10 @@
   }
   
   public int compareTo(Lexicon l) {
-    return name.compareTo(l.name);
+    if (description != null)
+      return description.compareTo(l.description);
+    else 
+      return name.compareTo(l.name);
   }
 
   public String getName() {
@@ -195,8 +199,11 @@
         }
         result = result + "</content>";
       }
-      if (entry.getRemoteUrl() != null)
-        result = result + "<remoteUrl>" + entry.getRemoteUrl() + "</remoteUrl>";
+      if (entry.getRemoteUrl() != null) {
+        String remoteUrl = entry.getRemoteUrl();
+        remoteUrl = StringEscapeUtils.escapeXml(remoteUrl);
+        result = result + "<remoteUrl>" + remoteUrl + "</remoteUrl>";
+      }
       result = result + "</entry>";
     }
     result = result + "</entries>";