Add backend version and improve info table layout

Change-Id: I6d3f15df0a2517be524096c0d255dfe121f36dcc
diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
index b9370aa..51bfb7a 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/IdsExportService.java
@@ -51,9 +51,10 @@
  * - Do not expect all meta data per match.
  * - Add progress mechanism.
  * - Add CSV export format.
- * - Add table layout to RTF information.
  * - Add loading marker.
  * - Add hitc to form.
+ * - Add infos to JsonExporter.
+ * - Add date info.
  */
 
 @Path("/")
diff --git a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/RtfExporter.java b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/RtfExporter.java
index d47a32d..b3aa445 100644
--- a/plugin/src/main/java/de/ids_mannheim/korap/plkexport/RtfExporter.java
+++ b/plugin/src/main/java/de/ids_mannheim/korap/plkexport/RtfExporter.java
@@ -179,7 +179,11 @@
             this.addInfoRow(w, "Source", this.getSource());
         };
 
-        this.addInfoRow(w, "Export-Plugin", this.getVersion().toString());
+        if (this.getMeta() != null && this.getMeta().has("version")) {
+            this.addInfoRow(w, "Backend-Version", this.getMeta().get("version").asText());
+        };
+
+        this.addInfoRow(w, "Export-Version", this.getVersion().toString());
     };
 
 
@@ -192,9 +196,11 @@
     // Add information row
     private void addInfoRow (Writer w, String title, String value) throws IOException {
         w.append("{\\trowd\\trql\\lttrow")
+            .append("\\clbrdrt\\brdrs\\clbrdrl\\brdrs\\clbrdrb\\brdrs")
             .append("\\clpadl80\\clpadt80\\clpadb80\\clpadr80\\clcbpat2\\cellx2000")
+            .append("\\clbrdrt\\brdrs\\clbrdrl\\brdrs\\clbrdrb\\brdrs\\clbrdrr\\brdrs")
             .append("\\clpadl80\\clpadt80\\clpadb80\\clpadr80\\cellx9300")
-            .append("\\intbl\\cf3\\fs18\\b1\\f0 ");
+            .append("\\intbl\\cf3\\fs18\\b1\\f1 ");
         rtfText(w, title);
         w.append(":\\cell\\cf0\\fs18\\b0\\f1 ");
         rtfText(w, value);
diff --git a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
index d316c9a..995304b 100644
--- a/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
+++ b/plugin/src/test/java/de/ids_mannheim/korap/plkexport/IdsExportServiceTest.java
@@ -511,13 +511,14 @@
                 Status.OK.getStatusCode(), responsertf.getStatus());
 
         str = responsertf.readEntity(String.class);
-        System.err.println(str);
         assertTrue("Page 1 content", str.contains("Ironhoof"));
         assertTrue("Page 2 content", str.contains("Sinologie"));
         assertTrue("Unicode handling", str.contains("\\u252\\'fcbersetzt"));
         assertTrue("TotalResults", str.contains("Count:" + CELLSPLIT + "9\\cell"));
         assertTrue("Fetched", str.contains("Fetched:" + CELLSPLIT + "7\\cell"));
         assertTrue("Source", str.contains("Source:" + CELLSPLIT + "localhost\\cell"));
+        assertTrue("Backend-Version", str.contains("Backend-Version:" + CELLSPLIT + "0.59.2"));
+        assertTrue("Export-Version", str.contains("Export-Version:" + CELLSPLIT));
     }