Importing WformServices and GlemmServices

Change-Id: Ifa95576d69e0d3863f63d3fdedb48c2c21cf64bc
diff --git a/Project-Tests/.classpath b/Project-Tests/.classpath
new file mode 100644
index 0000000..ad09874
--- /dev/null
+++ b/Project-Tests/.classpath
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/GlemmClient"/>
+	<classpathentry kind="src" output="target/classes" path="src">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="src-Utils"/>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/JsonTraverse"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/Utils"/>
+	<classpathentry exported="true" kind="lib" path="/Utils/target/Utils-0.1-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="/JsonTraverse/target/JsonTraverse-0.1-SNAPSHOT.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/wformServiceJar"/>
+	<classpathentry exported="true" kind="lib" path="/wformServiceJar/target/wformServiceJar-0.1-SNAPSHOT.jar"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/Project-Tests/.project b/Project-Tests/.project
new file mode 100644
index 0000000..82d872a
--- /dev/null
+++ b/Project-Tests/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Tests</name>
+	<comment></comment>
+	<projects>
+		<project>GlemmClient</project>
+		<project>JsonTraverse</project>
+		<project>Utils</project>
+		<project>wformServiceJar</project>
+		<project>wformServices</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>src-Utils</name>
+			<type>2</type>
+			<location>C:/myIDS/Daten/KorAP/Services/Utils/src</location>
+		</link>
+	</linkedResources>
+</projectDescription>
diff --git a/Project-Tests/.settings/org.eclipse.jdt.core.prefs b/Project-Tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8445b6b
--- /dev/null
+++ b/Project-Tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,13 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/Project-Tests/.settings/org.eclipse.m2e.core.prefs b/Project-Tests/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/Project-Tests/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/Project-Tests/GlemmServices.err b/Project-Tests/GlemmServices.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Project-Tests/GlemmServices.err
diff --git a/Project-Tests/GlemmServices.log b/Project-Tests/GlemmServices.log
new file mode 100644
index 0000000..72fee53
--- /dev/null
+++ b/Project-Tests/GlemmServices.log
@@ -0,0 +1,908 @@
+Debug: doPOST_handleWordformQueries: version date: 04.04.20.
+Debug: doPOST_handleWordformQueries: starting time: 2020-05-15T18:39:50.618.
+Debug: doPOST_handleWordformQueries: query = '{
+  "@context" : "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operands" : [ {
+      "@type" : "koral:doc",
+      "key" : "availability",
+      "match" : "match:eq",
+      "type" : "type:regex",
+      "value" : "CC-BY.*"
+    }, {
+      "@type" : "koral:docGroup",
+      "operands" : [ {
+        "@type" : "koral:doc",
+        "key" : "availability",
+        "match" : "match:eq",
+        "type" : "type:regex",
+        "value" : "CC-BY.*"
+      }, {
+        "@type" : "koral:docGroup",
+        "operands" : [ {
+          "@type" : "koral:doc",
+          "key" : "availability",
+          "match" : "match:eq",
+          "type" : "type:regex",
+          "value" : "ACA.*"
+        }, {
+          "@type" : "koral:docGroup",
+          "operands" : [ {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO-NC"
+          }, {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO.*"
+          } ],
+          "operation" : "operation:or"
+        } ],
+        "operation" : "operation:or"
+      } ],
+      "operation" : "operation:or"
+    } ],
+    "operation" : "operation:and",
+    "rewrites" : [ {
+      "@type" : "koral:rewrite",
+      "operation" : "operation:insertion",
+      "scope" : "availability(FREE)",
+      "src" : "Kustvakt"
+    } ]
+  },
+  "matches" : [ "..." ],
+  "meta" : {
+    "benchmark" : "5.08010068 s",
+    "context" : {
+      "left" : [ "token", 40 ],
+      "right" : [ "token", 40 ]
+    },
+    "count" : 25,
+    "cutOff" : true,
+    "fields" : [ "ID", "UID", "textSigle", "corpusID", "author", "title", "subTitle", "textClass", "pubPlace", "pubDate", "availability", "layerInfos", "docSigle", "corpusSigle" ],
+    "itemsPerPage" : 25,
+    "serialQuery" : "spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])",
+    "startIndex" : 0,
+    "timeout" : 10000,
+    "totalResults" : -1,
+    "version" : "0.59.1"
+  },
+  "query" : {
+    "@type" : "koral:group",
+    "distances" : [ {
+      "@type" : "cosmas:distance",
+      "boundary" : {
+        "@type" : "koral:boundary",
+        "max" : 2,
+        "min" : 0
+      },
+      "key" : "w"
+    } ],
+    "inOrder" : false,
+    "operands" : [ {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:group",
+        "operands" : [ {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "GF>2&rennen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "schlafen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "laufen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        } ],
+        "operation" : "operation:sequence"
+      } ],
+      "operation" : "operation:class"
+    }, {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:token",
+        "wrap" : {
+          "@type" : "koral:term",
+          "foundry" : "tt",
+          "key" : "kaufen",
+          "layer" : "lemma",
+          "match" : "match:eq",
+          "rewrites" : [ {
+            "@type" : "koral:rewrite",
+            "operation" : "operation:injection",
+            "scope" : "foundry",
+            "src" : "Kustvakt"
+          } ]
+        }
+      } ],
+      "operation" : "operation:class"
+    } ],
+    "operation" : "operation:sequence"
+  }
+}'.
+Debug: traverse_and_rewrite_KoralQuery: ready for traversing query...
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@context':
+Debug:traverseJsonTree: single value field = 'http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld'
+Debug:traverseJsonTree: key='collection':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'CC-BY.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'CC-BY.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'ACA.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'QAO-NC'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'QAO.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:and'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:insertion'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'availability(FREE)'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='matches':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = '...'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='meta':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='benchmark':
+Debug:traverseJsonTree: single value field = '5.08010068 s'
+Debug:traverseJsonTree: key='context':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='left':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'token'
+Debug:traverseJsonTree: single value field = '40'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='right':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'token'
+Debug:traverseJsonTree: single value field = '40'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='count':
+Debug:traverseJsonTree: single value field = '25'
+Debug:traverseJsonTree: key='cutOff':
+Debug:traverseJsonTree: single value field = 'true'
+Debug:traverseJsonTree: key='fields':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'ID'
+Debug:traverseJsonTree: single value field = 'UID'
+Debug:traverseJsonTree: single value field = 'textSigle'
+Debug:traverseJsonTree: single value field = 'corpusID'
+Debug:traverseJsonTree: single value field = 'author'
+Debug:traverseJsonTree: single value field = 'title'
+Debug:traverseJsonTree: single value field = 'subTitle'
+Debug:traverseJsonTree: single value field = 'textClass'
+Debug:traverseJsonTree: single value field = 'pubPlace'
+Debug:traverseJsonTree: single value field = 'pubDate'
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: single value field = 'layerInfos'
+Debug:traverseJsonTree: single value field = 'docSigle'
+Debug:traverseJsonTree: single value field = 'corpusSigle'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='itemsPerPage':
+Debug:traverseJsonTree: single value field = '25'
+Debug:traverseJsonTree: key='serialQuery':
+Debug:traverseJsonTree: single value field = 'spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])'
+Debug:traverseJsonTree: key='startIndex':
+Debug:traverseJsonTree: single value field = '0'
+Debug:traverseJsonTree: key='timeout':
+Debug:traverseJsonTree: single value field = '10000'
+Debug:traverseJsonTree: key='totalResults':
+Debug:traverseJsonTree: single value field = '-1'
+Debug:traverseJsonTree: key='version':
+Debug:traverseJsonTree: single value field = '0.59.1'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='query':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='distances':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'cosmas:distance'
+Debug:traverseJsonTree: key='boundary':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:boundary'
+Debug:traverseJsonTree: key='max':
+Debug:traverseJsonTree: single value field = '2'
+Debug:traverseJsonTree: key='min':
+Debug:traverseJsonTree: single value field = '0'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'w'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='inOrder':
+Debug:traverseJsonTree: single value field = 'false'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='classOut':
+Debug:traverseJsonTree: single value field = '129'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"GF>2&rennen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'GF>2&rennen'
+Debug: checkPath: found: lemma='GF>2&rennen' as koral:term.
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"schlafen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'schlafen'
+Debug: checkPath: found: lemma='schlafen' as koral:term.
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"laufen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'laufen'
+Debug: checkPath: found: lemma='laufen' as koral:term.
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:sequence'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:class'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='classOut':
+Debug:traverseJsonTree: single value field = '129'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"kaufen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'kaufen'
+Debug: checkPath: found: lemma='kaufen' as koral:term.
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:class'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:sequence'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug: traverse_and_rewrite_KoralQuery: query traversed.
+Debug: GlemmClient: constructor called.
+Debug: sendQuery: requested lemma = 'GF>2&rennen'.
+Debug: sendQuery: building URL='http://c0r4ft:40913/GlemmServices2-0.0.1-SNAPSHOT/index/info/lemma/GF>2&rennen'.
+Debug: sendQuery: HTTP return status = OK.
+Debug: sendQuery: HTTP Response Content = '{"head_nWfs":0,"head_options":"flex","head_query":"GF>2&rennen","listofWfs":[]}'.
+Debug: sendQuery: lemResp='head: nWfs=0, list=[].'.
+Debug: sendQuery: requested lemma = 'schlafen'.
+Debug: sendQuery: building URL='http://c0r4ft:40913/GlemmServices2-0.0.1-SNAPSHOT/index/info/lemma/schlafen'.
+Debug: sendQuery: HTTP return status = OK.
+Debug: sendQuery: HTTP Response Content = '{"head_nWfs":50,"head_options":"flex","head_query":"schlafen","listofWfs":["Geschlafen","Schlaef","Schlaefe","Schlaefst","Schlafe","Schlafen","Schlafend","Schlafende","Schlafendem","Schlafenden","Schlafender","Schlafendes","Schlafet","Schlafn","Schlafst","Schlaft","Schlief","Schliefe","Schliefen","Schliefest","Schliefst","Schlieft","geschlafen","schlaefst","schlaeft","schlaf","schlafe","schlafen","schlafend","schlafende","schlafendem","schlafenden","schlafender","schlafendes","schlafendst","schlafest","schlafet","schlafn","schlafnden","schlafst","schlaft","schlief","schliefe","schliefen","schliefend","schliefest","schliefet","schliefst","schlieft","schläft"]}'.
+Debug: sendQuery: lemResp='head: nWfs=50, list=[Geschlafen, Schlaef, Schlaefe, Schlaefst, Schlafe, Schlafen, Schlafend, Schlafende, Schlafendem, Schlafenden, Schlafender, Schlafendes, Schlafet, Schlafn, Schlafst, Schlaft, Schlief, Schliefe, Schliefen, Schliefest, Schliefst, Schlieft, geschlafen, schlaefst, schlaeft, schlaf, schlafe, schlafen, schlafend, schlafende, schlafendem, schlafenden, schlafender, schlafendes, schlafendst, schlafest, schlafet, schlafn, schlafnden, schlafst, schlaft, schlief, schliefe, schliefen, schliefend, schliefest, schliefet, schliefst, schlieft, schläft].'.
+Debug: sendQuery: requested lemma = 'laufen'.
+Debug: sendQuery: building URL='http://c0r4ft:40913/GlemmServices2-0.0.1-SNAPSHOT/index/info/lemma/laufen'.
+Debug: sendQuery: HTTP return status = OK.
+Debug: sendQuery: HTTP Response Content = '{"head_nWfs":38,"head_options":"flex","head_query":"laufen","listofWfs":["Gelaufen","Laeufe","Laeufst","Laeuft","Laufe","Laufen","Laufendsten","Laufet","Laufn","Lauft","Lief","Liefe","Liefen","Lieft","gelaufen","laeufst","laeuft","laeufts","lauf","laufe","laufen","laufend","laufet","laufn","laufnden","laufst","lauft","lief","liefe","liefen","liefend","liefenden","liefender","liefest","liefet","liefst","lieft","läuft"]}'.
+Debug: sendQuery: lemResp='head: nWfs=38, list=[Gelaufen, Laeufe, Laeufst, Laeuft, Laufe, Laufen, Laufendsten, Laufet, Laufn, Lauft, Lief, Liefe, Liefen, Lieft, gelaufen, laeufst, laeuft, laeufts, lauf, laufe, laufen, laufend, laufet, laufn, laufnden, laufst, lauft, lief, liefe, liefen, liefend, liefenden, liefender, liefest, liefet, liefst, lieft, läuft].'.
+Debug: sendQuery: requested lemma = 'kaufen'.
+Debug: sendQuery: building URL='http://c0r4ft:40913/GlemmServices2-0.0.1-SNAPSHOT/index/info/lemma/kaufen'.
+Debug: sendQuery: HTTP return status = OK.
+Debug: sendQuery: HTTP Response Content = '{"head_nWfs":37,"head_options":"flex","head_query":"kaufen","listofWfs":["Gekauft","Kaufe","Kaufen","Kaufend","Kaufende","Kaufenden","Kaufender","Kaufendes","Kaufet","Kaufn","Kaufst","Kauft","Kaufte","Kauften","Zukaufe","gekauft","kauf","kaufe","kaufen","kaufend","kaufende","kaufendem","kaufenden","kaufender","kaufendes","kaufest","kaufet","kaufn","kaufst","kauft","kaufte","kauften","kauftest","kauftet","kauftst","zukaufe","zukaufte"]}'.
+Debug: sendQuery: lemResp='head: nWfs=37, list=[Gekauft, Kaufe, Kaufen, Kaufend, Kaufende, Kaufenden, Kaufender, Kaufendes, Kaufet, Kaufn, Kaufst, Kauft, Kaufte, Kauften, Zukaufe, gekauft, kauf, kaufe, kaufen, kaufend, kaufende, kaufendem, kaufenden, kaufender, kaufendes, kaufest, kaufet, kaufn, kaufst, kauft, kaufte, kauften, kauftest, kauftet, kauftst, zukaufe, zukaufte].'.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@context':
+Debug:traverseJsonTree: single value field = 'http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld'
+Debug:traverseJsonTree: key='collection':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'CC-BY.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'CC-BY.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'ACA.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:docGroup'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'QAO-NC'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:doc'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='type':
+Debug:traverseJsonTree: single value field = 'type:regex'
+Debug:traverseJsonTree: key='value':
+Debug:traverseJsonTree: single value field = 'QAO.*'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:or'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:and'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:insertion'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'availability(FREE)'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='matches':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = '...'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='meta':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='benchmark':
+Debug:traverseJsonTree: single value field = '5.08010068 s'
+Debug:traverseJsonTree: key='context':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='left':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'token'
+Debug:traverseJsonTree: single value field = '40'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='right':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'token'
+Debug:traverseJsonTree: single value field = '40'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='count':
+Debug:traverseJsonTree: single value field = '25'
+Debug:traverseJsonTree: key='cutOff':
+Debug:traverseJsonTree: single value field = 'true'
+Debug:traverseJsonTree: key='fields':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: single value field = 'ID'
+Debug:traverseJsonTree: single value field = 'UID'
+Debug:traverseJsonTree: single value field = 'textSigle'
+Debug:traverseJsonTree: single value field = 'corpusID'
+Debug:traverseJsonTree: single value field = 'author'
+Debug:traverseJsonTree: single value field = 'title'
+Debug:traverseJsonTree: single value field = 'subTitle'
+Debug:traverseJsonTree: single value field = 'textClass'
+Debug:traverseJsonTree: single value field = 'pubPlace'
+Debug:traverseJsonTree: single value field = 'pubDate'
+Debug:traverseJsonTree: single value field = 'availability'
+Debug:traverseJsonTree: single value field = 'layerInfos'
+Debug:traverseJsonTree: single value field = 'docSigle'
+Debug:traverseJsonTree: single value field = 'corpusSigle'
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='itemsPerPage':
+Debug:traverseJsonTree: single value field = '25'
+Debug:traverseJsonTree: key='serialQuery':
+Debug:traverseJsonTree: single value field = 'spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])'
+Debug:traverseJsonTree: key='startIndex':
+Debug:traverseJsonTree: single value field = '0'
+Debug:traverseJsonTree: key='timeout':
+Debug:traverseJsonTree: single value field = '10000'
+Debug:traverseJsonTree: key='totalResults':
+Debug:traverseJsonTree: single value field = '-1'
+Debug:traverseJsonTree: key='version':
+Debug:traverseJsonTree: single value field = '0.59.1'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='query':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='distances':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'cosmas:distance'
+Debug:traverseJsonTree: key='boundary':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:boundary'
+Debug:traverseJsonTree: key='max':
+Debug:traverseJsonTree: single value field = '2'
+Debug:traverseJsonTree: key='min':
+Debug:traverseJsonTree: single value field = '0'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'w'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='inOrder':
+Debug:traverseJsonTree: single value field = 'false'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='classOut':
+Debug:traverseJsonTree: single value field = '129'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"GF>2&rennen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'GF>2&rennen'
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug: rewriteObjNode: rewriting for lemma 'GF>2&rennen'.
+Debug:traverseJsonTree: after rewrite: node='{"@type":"koral:term","foundry":"tt","key":[],"layer":"orth","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}],"desc":"&GF>2&rennen","hide":"key"}'.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"schlafen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'schlafen'
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug: rewriteObjNode: rewriting for lemma 'schlafen'.
+Debug:traverseJsonTree: after rewrite: node='{"@type":"koral:term","foundry":"tt","key":["Geschlafen","Schlaef","Schlaefe","Schlaefst","Schlafe","Schlafen","Schlafend","Schlafende","Schlafendem","Schlafenden","Schlafender","Schlafendes","Schlafet","Schlafn","Schlafst","Schlaft","Schlief","Schliefe","Schliefen","Schliefest","Schliefst","Schlieft","geschlafen","schlaefst","schlaeft","schlaf","schlafe","schlafen","schlafend","schlafende","schlafendem","schlafenden","schlafender","schlafendes","schlafendst","schlafest","schlafet","schlafn","schlafnden","schlafst","schlaft","schlief","schliefe","schliefen","schliefend","schliefest","schliefet","schliefst","schlieft","schläft"],"layer":"orth","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}],"desc":"&schlafen","hide":"key"}'.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"laufen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'laufen'
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug: rewriteObjNode: rewriting for lemma 'laufen'.
+Debug:traverseJsonTree: after rewrite: node='{"@type":"koral:term","foundry":"tt","key":["Gelaufen","Laeufe","Laeufst","Laeuft","Laufe","Laufen","Laufendsten","Laufet","Laufn","Lauft","Lief","Liefe","Liefen","Lieft","gelaufen","laeufst","laeuft","laeufts","lauf","laufe","laufen","laufend","laufet","laufn","laufnden","laufst","lauft","lief","liefe","liefen","liefend","liefenden","liefender","liefest","liefet","liefst","lieft","läuft"],"layer":"orth","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}],"desc":"&laufen","hide":"key"}'.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:sequence'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:class'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:group'
+Debug:traverseJsonTree: key='classOut':
+Debug:traverseJsonTree: single value field = '129'
+Debug:traverseJsonTree: key='operands':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:token'
+Debug: checkPath: wrap-Obj: '{"@type":"koral:term","foundry":"tt","key":"kaufen","layer":"lemma","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}]}'
+Debug:traverseJsonTree: key='wrap':
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:term'
+Debug:traverseJsonTree: key='foundry':
+Debug:traverseJsonTree: single value field = 'tt'
+Debug:traverseJsonTree: key='key':
+Debug:traverseJsonTree: single value field = 'kaufen'
+Debug:traverseJsonTree: key='layer':
+Debug:traverseJsonTree: single value field = 'lemma'
+Debug:traverseJsonTree: key='match':
+Debug:traverseJsonTree: single value field = 'match:eq'
+Debug:traverseJsonTree: key='rewrites':
+Debug:traverseJsonTree: array: [
+Debug:traverseJsonTree: object: { 
+Debug:traverseJsonTree: key='@type':
+Debug:traverseJsonTree: single value field = 'koral:rewrite'
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:injection'
+Debug:traverseJsonTree: key='scope':
+Debug:traverseJsonTree: single value field = 'foundry'
+Debug:traverseJsonTree: key='src':
+Debug:traverseJsonTree: single value field = 'Kustvakt'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: } : end of object.
+Debug: rewriteObjNode: rewriting for lemma 'kaufen'.
+Debug:traverseJsonTree: after rewrite: node='{"@type":"koral:term","foundry":"tt","key":["Gekauft","Kaufe","Kaufen","Kaufend","Kaufende","Kaufenden","Kaufender","Kaufendes","Kaufet","Kaufn","Kaufst","Kauft","Kaufte","Kauften","Zukaufe","gekauft","kauf","kaufe","kaufen","kaufend","kaufende","kaufendem","kaufenden","kaufender","kaufendes","kaufest","kaufet","kaufn","kaufst","kauft","kaufte","kauften","kauftest","kauftet","kauftst","zukaufe","zukaufte"],"layer":"orth","match":"match:eq","rewrites":[{"@type":"koral:rewrite","operation":"operation:injection","scope":"foundry","src":"Kustvakt"}],"desc":"&kaufen","hide":"key"}'.
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:class'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: ] end of array.
+Debug:traverseJsonTree: key='operation':
+Debug:traverseJsonTree: single value field = 'operation:sequence'
+Debug:traverseJsonTree: } : end of object.
+Debug:traverseJsonTree: } : end of object.
+Debug: simulateWordformServices: receiving rewritten query from WordformServices...
diff --git a/Project-Tests/Readme.txt b/Project-Tests/Readme.txt
new file mode 100644
index 0000000..a3a737c
--- /dev/null
+++ b/Project-Tests/Readme.txt
@@ -0,0 +1,21 @@
+Kompilation von Project-Tests
+=============================
+
+Update: 22.04.20/FB
+
+Projekte:
+
+1. Project-Tests > target/TestGlemmServices.jar
+2. Project GlemmClient > target ... GlemmClient.class
+
+Compilieren:
+
+ - Project clean
+ - Project build
+ - Project Project-Tests: Run As Build mit Goal = package.
+
+Erzeugt:
+
+ - Projekt "Project-Tests" > target > TestGlemmClient.jar.
+ - Diese Vorgehensweise kopiert GlemmClient.class in Project-Tests. Es wird keine GlemmClient.jar erzeugt.
+ - Erzeugen von GlemmClient-0.0.1-SNAPSHOT.jar: Projekt "GlemmClient" - Run As build mit Goal = package.
\ No newline at end of file
diff --git a/Project-Tests/pom.xml b/Project-Tests/pom.xml
new file mode 100644
index 0000000..b1c269c
--- /dev/null
+++ b/Project-Tests/pom.xml
@@ -0,0 +1,82 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" 
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>de.korap.services</groupId>
+  <artifactId>tests</artifactId>
+  <version>0.1</version>
+  <!--  >packaging>war</packaging-->
+  <name>Json Test Methods</name>
+  
+  <description>Tests for Json Parsing</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+   <dependency>
+    <groupId>com.fasterxml.jackson.core</groupId>
+    <artifactId>jackson-core</artifactId>
+    <version>2.9.6</version>
+    <scope>compile</scope>
+   </dependency>
+	<dependency>
+	  <groupId>com.fasterxml.jackson.core</groupId>
+	  <artifactId>jackson-annotations</artifactId>
+	  <version>2.9.6</version>
+	</dependency>
+	<dependency>
+	  <groupId>com.fasterxml.jackson.core</groupId>
+	  <artifactId>jackson-databind</artifactId>
+	  <version>2.9.6</version>
+	  <scope>provided</scope>
+	</dependency>
+	<dependency>
+		<groupId>de.korap.json</groupId>
+		<artifactId>JsonTraverse</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</dependency>
+	<dependency>
+		<groupId>de.korap.services.glemm.client</groupId>
+		<artifactId>GlemmClient</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</dependency>
+	<dependency>
+		<groupId>de.korap.services</groupId>
+		<artifactId>Utils</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</dependency>
+	<dependency>
+		<groupId>de.korap.services</groupId>
+		<artifactId>wformServiceJar</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</dependency>
+  </dependencies>
+  
+  <build>
+    <sourceDirectory>src</sourceDirectory>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.7.0</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>3.2.1</version>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+          <warSourceDirectory>WebContent</warSourceDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+    <finalName>TestGlemmServices</finalName>
+  </build>
+  
+</project>
\ No newline at end of file
diff --git a/Project-Tests/query.in.pretty.json b/Project-Tests/query.in.pretty.json
new file mode 100644
index 0000000..f13227c
--- /dev/null
+++ b/Project-Tests/query.in.pretty.json
@@ -0,0 +1,162 @@
+{
+  "@context" : "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operands" : [ {
+      "@type" : "koral:doc",
+      "key" : "availability",
+      "match" : "match:eq",
+      "type" : "type:regex",
+      "value" : "CC-BY.*"
+    }, {
+      "@type" : "koral:docGroup",
+      "operands" : [ {
+        "@type" : "koral:doc",
+        "key" : "availability",
+        "match" : "match:eq",
+        "type" : "type:regex",
+        "value" : "CC-BY.*"
+      }, {
+        "@type" : "koral:docGroup",
+        "operands" : [ {
+          "@type" : "koral:doc",
+          "key" : "availability",
+          "match" : "match:eq",
+          "type" : "type:regex",
+          "value" : "ACA.*"
+        }, {
+          "@type" : "koral:docGroup",
+          "operands" : [ {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO-NC"
+          }, {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO.*"
+          } ],
+          "operation" : "operation:or"
+        } ],
+        "operation" : "operation:or"
+      } ],
+      "operation" : "operation:or"
+    } ],
+    "operation" : "operation:and",
+    "rewrites" : [ {
+      "@type" : "koral:rewrite",
+      "operation" : "operation:insertion",
+      "scope" : "availability(FREE)",
+      "src" : "Kustvakt"
+    } ]
+  },
+  "matches" : [ "..." ],
+  "meta" : {
+    "benchmark" : "5.08010068 s",
+    "context" : {
+      "left" : [ "token", 40 ],
+      "right" : [ "token", 40 ]
+    },
+    "count" : 25,
+    "cutOff" : true,
+    "fields" : [ "ID", "UID", "textSigle", "corpusID", "author", "title", "subTitle", "textClass", "pubPlace", "pubDate", "availability", "layerInfos", "docSigle", "corpusSigle" ],
+    "itemsPerPage" : 25,
+    "serialQuery" : "spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])",
+    "startIndex" : 0,
+    "timeout" : 10000,
+    "totalResults" : -1,
+    "version" : "0.59.1"
+  },
+  "query" : {
+    "@type" : "koral:group",
+    "distances" : [ {
+      "@type" : "cosmas:distance",
+      "boundary" : {
+        "@type" : "koral:boundary",
+        "max" : 2,
+        "min" : 0
+      },
+      "key" : "w"
+    } ],
+    "inOrder" : false,
+    "operands" : [ {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:group",
+        "operands" : [ {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "GF>2&rennen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "schlafen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "laufen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        } ],
+        "operation" : "operation:sequence"
+      } ],
+      "operation" : "operation:class"
+    }, {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:token",
+        "wrap" : {
+          "@type" : "koral:term",
+          "foundry" : "tt",
+          "key" : "kaufen",
+          "layer" : "lemma",
+          "match" : "match:eq",
+          "rewrites" : [ {
+            "@type" : "koral:rewrite",
+            "operation" : "operation:injection",
+            "scope" : "foundry",
+            "src" : "Kustvakt"
+          } ]
+        }
+      } ],
+      "operation" : "operation:class"
+    } ],
+    "operation" : "operation:sequence"
+  }
+}
\ No newline at end of file
diff --git a/Project-Tests/query.json b/Project-Tests/query.json
new file mode 100644
index 0000000..c9a1c35
--- /dev/null
+++ b/Project-Tests/query.json
@@ -0,0 +1,220 @@
+{
+  "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+  "collection": {
+    "@type": "koral:docGroup",
+    "operands": [
+      {
+        "@type": "koral:doc",
+        "key": "availability",
+        "match": "match:eq",
+        "type": "type:regex",
+        "value": "CC-BY.*"
+      },
+      {
+        "@type": "koral:docGroup",
+        "operands": [
+          {
+            "@type": "koral:doc",
+            "key": "availability",
+            "match": "match:eq",
+            "type": "type:regex",
+            "value": "CC-BY.*"
+          },
+          {
+            "@type": "koral:docGroup",
+            "operands": [
+              {
+                "@type": "koral:doc",
+                "key": "availability",
+                "match": "match:eq",
+                "type": "type:regex",
+                "value": "ACA.*"
+              },
+              {
+                "@type": "koral:docGroup",
+                "operands": [
+                  {
+                    "@type": "koral:doc",
+                    "key": "availability",
+                    "match": "match:eq",
+                    "type": "type:regex",
+                    "value": "QAO-NC"
+                  },
+                  {
+                    "@type": "koral:doc",
+                    "key": "availability",
+                    "match": "match:eq",
+                    "type": "type:regex",
+                    "value": "QAO.*"
+                  }
+                ],
+                "operation": "operation:or"
+              }
+            ],
+            "operation": "operation:or"
+          }
+        ],
+        "operation": "operation:or"
+      }
+    ],
+    "operation": "operation:and",
+    "rewrites": [
+      {
+        "@type": "koral:rewrite",
+        "operation": "operation:insertion",
+        "scope": "availability(FREE)",
+        "src": "Kustvakt"
+      }
+    ]
+  },
+  "matches": [
+    "..."
+  ],
+  "meta": {
+    "benchmark": "5.08010068 s",
+    "context": {
+      "left": [
+        "token",
+        40
+      ],
+      "right": [
+        "token",
+        40
+      ]
+    },
+    "count": 25,
+    "cutOff": true,
+    "fields": [
+      "ID",
+      "UID",
+      "textSigle",
+      "corpusID",
+      "author",
+      "title",
+      "subTitle",
+      "textClass",
+      "pubPlace",
+      "pubDate",
+      "availability",
+      "layerInfos",
+      "docSigle",
+      "corpusSigle"
+    ],
+    "itemsPerPage": 25,
+    "serialQuery": "spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])",
+    "startIndex": 0,
+    "timeout": 10000,
+    "totalResults": -1,
+    "version": "0.59.1"
+  },
+  "query": {
+    "@type": "koral:group",
+    "distances": [
+      {
+        "@type": "cosmas:distance",
+        "boundary": {
+          "@type": "koral:boundary",
+          "max": 2,
+          "min": 0
+        },
+        "key": "w"
+      }
+    ],
+    "inOrder": false,
+    "operands": [
+      {
+        "@type": "koral:group",
+        "classOut": 129,
+        "operands": [
+          {
+            "@type": "koral:group",
+            "operands": [
+              {
+                "@type": "koral:token",
+                "wrap": {
+                  "@type": "koral:term",
+                  "foundry": "tt",
+                  "key": "GF>2&rennen",
+                  "layer": "lemma",
+                  "match": "match:eq",
+                  "rewrites": [
+                    {
+                      "@type": "koral:rewrite",
+                      "operation": "operation:injection",
+                      "scope": "foundry",
+                      "src": "Kustvakt"
+                    }
+                  ]
+                }
+              },
+              {
+                "@type": "koral:token",
+                "wrap": {
+                  "@type": "koral:term",
+                  "foundry": "tt",
+                  "key": "schlafen",
+                  "layer": "lemma",
+                  "match": "match:eq",
+                  "rewrites": [
+                    {
+                      "@type": "koral:rewrite",
+                      "operation": "operation:injection",
+                      "scope": "foundry",
+                      "src": "Kustvakt"
+                    }
+                  ]
+                }
+              },
+              {
+                "@type": "koral:token",
+                "wrap": {
+                  "@type": "koral:term",
+                  "foundry": "tt",
+                  "key": "laufen",
+                  "layer": "lemma",
+                  "match": "match:eq",
+                  "rewrites": [
+                    {
+                      "@type": "koral:rewrite",
+                      "operation": "operation:injection",
+                      "scope": "foundry",
+                      "src": "Kustvakt"
+                    }
+                  ]
+                }
+              }
+            ],
+            "operation": "operation:sequence"
+          }
+        ],
+        "operation": "operation:class"
+      },
+      {
+        "@type": "koral:group",
+        "classOut": 129,
+        "operands": [
+          {
+            "@type": "koral:token",
+            "wrap": {
+              "@type": "koral:term",
+              "foundry": "tt",
+              "key": "kaufen",
+              "layer": "lemma",
+              "match": "match:eq",
+              "rewrites": [
+                {
+                  "@type": "koral:rewrite",
+                  "operation": "operation:injection",
+                  "scope": "foundry",
+                  "src": "Kustvakt"
+                }
+              ]
+            }
+          }
+        ],
+        "operation": "operation:class"
+      }
+    ],
+    "operation": "operation:sequence"
+  }
+}
diff --git a/Project-Tests/query.out.pretty.json b/Project-Tests/query.out.pretty.json
new file mode 100644
index 0000000..f13227c
--- /dev/null
+++ b/Project-Tests/query.out.pretty.json
@@ -0,0 +1,162 @@
+{
+  "@context" : "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operands" : [ {
+      "@type" : "koral:doc",
+      "key" : "availability",
+      "match" : "match:eq",
+      "type" : "type:regex",
+      "value" : "CC-BY.*"
+    }, {
+      "@type" : "koral:docGroup",
+      "operands" : [ {
+        "@type" : "koral:doc",
+        "key" : "availability",
+        "match" : "match:eq",
+        "type" : "type:regex",
+        "value" : "CC-BY.*"
+      }, {
+        "@type" : "koral:docGroup",
+        "operands" : [ {
+          "@type" : "koral:doc",
+          "key" : "availability",
+          "match" : "match:eq",
+          "type" : "type:regex",
+          "value" : "ACA.*"
+        }, {
+          "@type" : "koral:docGroup",
+          "operands" : [ {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO-NC"
+          }, {
+            "@type" : "koral:doc",
+            "key" : "availability",
+            "match" : "match:eq",
+            "type" : "type:regex",
+            "value" : "QAO.*"
+          } ],
+          "operation" : "operation:or"
+        } ],
+        "operation" : "operation:or"
+      } ],
+      "operation" : "operation:or"
+    } ],
+    "operation" : "operation:and",
+    "rewrites" : [ {
+      "@type" : "koral:rewrite",
+      "operation" : "operation:insertion",
+      "scope" : "availability(FREE)",
+      "src" : "Kustvakt"
+    } ]
+  },
+  "matches" : [ "..." ],
+  "meta" : {
+    "benchmark" : "5.08010068 s",
+    "context" : {
+      "left" : [ "token", 40 ],
+      "right" : [ "token", 40 ]
+    },
+    "count" : 25,
+    "cutOff" : true,
+    "fields" : [ "ID", "UID", "textSigle", "corpusID", "author", "title", "subTitle", "textClass", "pubPlace", "pubDate", "availability", "layerInfos", "docSigle", "corpusSigle" ],
+    "itemsPerPage" : 25,
+    "serialQuery" : "spanDistance({129: spanNext(spanNext(tokens:tt/l:rennen, tokens:tt/l:schlafen), tokens:tt/l:laufen)}, {129: tokens:tt/l:kaufen}, [(w[0:2], notOrdered, notExcluded)])",
+    "startIndex" : 0,
+    "timeout" : 10000,
+    "totalResults" : -1,
+    "version" : "0.59.1"
+  },
+  "query" : {
+    "@type" : "koral:group",
+    "distances" : [ {
+      "@type" : "cosmas:distance",
+      "boundary" : {
+        "@type" : "koral:boundary",
+        "max" : 2,
+        "min" : 0
+      },
+      "key" : "w"
+    } ],
+    "inOrder" : false,
+    "operands" : [ {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:group",
+        "operands" : [ {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "GF>2&rennen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "schlafen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        }, {
+          "@type" : "koral:token",
+          "wrap" : {
+            "@type" : "koral:term",
+            "foundry" : "tt",
+            "key" : "laufen",
+            "layer" : "lemma",
+            "match" : "match:eq",
+            "rewrites" : [ {
+              "@type" : "koral:rewrite",
+              "operation" : "operation:injection",
+              "scope" : "foundry",
+              "src" : "Kustvakt"
+            } ]
+          }
+        } ],
+        "operation" : "operation:sequence"
+      } ],
+      "operation" : "operation:class"
+    }, {
+      "@type" : "koral:group",
+      "classOut" : 129,
+      "operands" : [ {
+        "@type" : "koral:token",
+        "wrap" : {
+          "@type" : "koral:term",
+          "foundry" : "tt",
+          "key" : "kaufen",
+          "layer" : "lemma",
+          "match" : "match:eq",
+          "rewrites" : [ {
+            "@type" : "koral:rewrite",
+            "operation" : "operation:injection",
+            "scope" : "foundry",
+            "src" : "Kustvakt"
+          } ]
+        }
+      } ],
+      "operation" : "operation:class"
+    } ],
+    "operation" : "operation:sequence"
+  }
+}
\ No newline at end of file
diff --git a/Project-Tests/src/test/TestJson.java b/Project-Tests/src/test/TestJson.java
new file mode 100644
index 0000000..0160ff6
--- /dev/null
+++ b/Project-Tests/src/test/TestJson.java
@@ -0,0 +1,214 @@
+/* 
+ * Set of methods for testing Json parsing methods, wordform services and Glemm services.
+ * 
+ * 03.04.20/FB
+ */
+
+package test;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import de.korap.json.JsonTraverse;
+import de.korap.json.TraversedPath;
+import de.korap.services.glemm.client.GlemmClient;
+import de.korap.services.utils.Utils;
+import de.korap.services.WordformServices;
+
+public class TestJson
+
+{
+	static String inputFilename = "query.in.pretty.json";
+	static String outputFilename = "query.out.pretty.json";
+
+	final static boolean bSimulateWordformServices = true;
+	
+	public static void main(String[] args)
+	
+	{
+	File
+		inFile = new File(inputFilename);
+	File
+		outFile = new File(outputFilename);
+    ObjectMapper
+		objMapper = null;
+	JsonNode
+		jsonNode = null;
+	TraversedPath
+		tPath	 = null;
+	int
+		mode	 = JsonTraverse.REWRITE; 	// JsonTraverse.REWRITE or REWRITE_EXP
+	
+	if( bSimulateWordformServices )
+	{
+		System.out.printf("TestJson: starting simulation of WordformServices...\n");
+		simulateWordformServices(inputFilename, outputFilename);
+		return;
+	}
+	
+	System.out.printf("TestJson: test on '%s'...\n", inputFilename);
+	
+	objMapper = new ObjectMapper();
+	
+	// get full query as a JsonNode tree:
+	try {
+		// get full query from file as a JsonNode tree:
+		jsonNode = objMapper.readTree(inFile);
+		System.out.printf("TestJson: reading from input file: ok.\n");
+		
+		// traverse query and collect lemma subqueries in a TraversedPath object:
+		tPath = new TraversedPath(objMapper);
+		JsonTraverse.traverseJsonTree(jsonNode, tPath, JsonTraverse.COLLECT);
+		System.out.printf("Debug: TestJson: gefundene Lemmata: #: %d, list: '%s'.\n", tPath.getLemmaCount(), tPath.getLemmata());
+		} 
+	catch (IOException e) {
+		e.printStackTrace();
+		}
+
+	// Exit if no lemma subqueries found:
+	if( tPath == null || tPath.getLemmaCount() == 0 )
+		{
+		System.out.printf("TestJson: keine lemmata gefunden > Rewrite überspringen.\n");
+		return;
+		}
+
+	// Call GlemmServices to resolve lemma-Subqueries.
+	// This returns for each lemma a reference to a list of wordform instanciations
+	// (= instantiation list). 
+	// This list is submitted to traversJsonTree() with the use of the tPath object.
+	
+	// Simulates building of expansion lists, storing them in tPath:
+	if( mode == JsonTraverse.REWRITE)
+		{
+		simulateGlemmServicesConnect(tPath);
+		simulateGlemmServices(tPath);
+		}
+	else
+		simulateGlemmServicesWfs(tPath);
+	
+	// Rewrite KoralQuery: use either JsonTraverse.REWRITE or .REWRITE_EXP:
+	
+	JsonTraverse.traverseJsonTree(jsonNode, tPath, mode);
+		
+	// return rewrittn Json Tree to file:
+	try {
+		objMapper.writerWithDefaultPrettyPrinter().writeValue(outFile, jsonNode);
+		} 
+	catch (IOException e) 
+		{
+		e.printStackTrace();
+		}
+	
+	} // main
+	
+	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+	 * simulateWordformServices:
+	 * 
+	 * - calls same methode to parse and rewrite KoralQuery that wordformServices do.
+	 * 
+	 * 24.04.20/FB 
+	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+	 */
+	
+	static void simulateWordformServices(String inputFilename, String outputFilename)  
+	
+	{
+	final String func = "simulateWordformServices";
+	String
+		query		= null,
+		newQuery	= null;
+
+    try {
+		query = Utils.readFromInputStream("./" + inputFilename);
+		} 
+    catch (IOException e1) {
+		e1.printStackTrace();
+		return;
+		}
+    
+    System.out.printf("Debug: %s: sending query to WordformServices...\n",  func);
+    
+	newQuery = WordformServices.doPOST_handleWordformQueries(query) ;
+		
+    System.out.printf("Debug: %s: receiving rewritten query from WordformServices...\n",  func);
+    
+    Utils.writeToOutputStream("./" + outputFilename, newQuery);
+
+	} // simulateWordformServices
+	
+	
+	/* simulateGlemmServicesClient
+	 * 
+	 * 14.04.20/FB
+	 * 
+	 */
+	
+	static int simulateGlemmServicesConnect(TraversedPath tPath)
+	
+	{
+	final String func = "simulateGlemmServicesConnect";
+	GlemmClient
+		glemmClient = new GlemmClient();
+	
+	glemmClient.GlemmConnect();
+	System.out.printf("Debug: %s: done.\n",  func);
+	
+	return 0;
+	} // simulateGlemmServicesClient
+	
+	/* simulateGlemmServices
+	 * 
+	 * input: list of lemmata
+	 * output: list of lemmata (same order) with references to expansion lists.
+	 * 07.04.20/FB
+	 */
+	
+	static void simulateGlemmServices(TraversedPath tPath)
+	
+	{
+		for(int i=0; i<tPath.getLemmaCount(); i++)
+			{
+			tPath.setRef("ref-" + tPath.getLemma(i) + ":" + i);
+			}
+	
+	System.out.printf("tPath.refs: #=%d list='%s'.\n", tPath.getRefsCount(), tPath.getRefsasString());
+		
+	} // simulateGlemmServices
+	
+	/* simulateGlemmServicesWfs
+	 * 
+	 * input: list of lemmata
+	 * output: list of expansion lists (= wordforms), same order.
+	 * 08.04.20/FB
+	 */
+	
+	static void simulateGlemmServicesWfs(TraversedPath tPath)
+	
+	{
+		for(int i=0; i<tPath.getLemmaCount(); i++)
+			{
+			List<String>
+				expList = new ArrayList(i+1);
+			
+			for(int j=0; j<i+1; j++)
+				{
+				expList.add(tPath.getLemma(i) + j);
+				}
+			
+			tPath.addExpList(expList); 
+			}
+	
+	System.out.printf("Debug: simulatedGlemmServicesWfs: %d expansion lists added.\n", tPath.getLemmaCount());
+		
+	} // simulateGlemmServicesWfs
+	
+		
+} // TestJson
\ No newline at end of file