Finalized test suite adoption from legacy collection

Change-Id: I594597f2364df68007c22c8c78fc54f4385d2ccf
diff --git a/src/test/resources/queries/metaquery.jsonld b/src/test/resources/queries/metaquery.jsonld
index b0b4c55..7d785c7 100644
--- a/src/test/resources/queries/metaquery.jsonld
+++ b/src/test/resources/queries/metaquery.jsonld
@@ -1,115 +1,180 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "meta" : {
-      "startPage" : 2,
-      "count" : 5,
-      "context" : {
-	"left" : [ "token", 3 ],
-	"right" : [ "char", 6 ]
-      }
-    },
-   "query":{
-      "@type":"koral:group",
-      "operation":"operation:or",
-      "operands":[
-         {
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "meta" : {
+    "startPage" : 2,
+    "count" : 5,
+    "context" : {
+      "left" : [ "token", 3 ],
+      "right" : [ "char", 6 ]
+    }
+  },
+  "query":{
+    "@type":"koral:group",
+    "operation":"operation:or",
+    "operands":[
+      {
+        "@type":"koral:token",
+        "wrap":{
+          "@type":"koral:term",
+          "foundry":"mate",
+	  "layer" : "lemma",
+	  "key" : "Vokal",
+          "match":"match:eq"
+        }
+      },
+      {
+        "@type":"koral:group",
+	"operation": "operation:sequence",
+        "operands":[
+          {
             "@type":"koral:token",
             "wrap":{
-               "@type":"koral:term",
-               "foundry":"mate",
-	      "layer" : "lemma",
-	      "key" : "Vokal",
-               "match":"match:eq"
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "base",
+	      "key" : "der",
+              "match":"match:eq"
             }
-         },
-         {
-            "@type":"koral:group",
-	   "operation": "operation:sequence",
-            "operands":[
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                    "@type":"koral:term",
-                    "foundry":"mate",
-		    "layer" : "base",
-		    "key" : "der",
-                    "match":"match:eq"
-                  }
-               },
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-                     "foundry":"mate",
-		      "layer" : "pos",
-		      "key" : "ADJA",
-                     "match":"match:eq"
-                  }
-               }
-            ]
-         }
-      ]
-   },
-    "collections": [
-        {
-            "@type": "koral:meta-filter",
-            "@id": "korap-filter#id-1223232",
-            "@value": {
-                "@type": "koral:term",
-                "@field": "koral:field#textClass",
-                "@value": "wissenschaft"
+          },
+          {
+            "@type":"koral:token",
+            "wrap":{
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "pos",
+	      "key" : "ADJA",
+              "match":"match:eq"
             }
-        },
-        {
-            "@type": "koral:meta-filter",
-            "@id": "korap-filter#id-34345454",
-            "@value": {
-                "@type": "koral:group",
-                "relation": "and",
-                "operands": [
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#pubPlace",
-                        "@value": "Erfurt"
-                    },
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#author",
-                        "@value": "Hesse"
-                    }
-                ]
-            }
-        },
-        {
-            "@type": "koral:meta-extend",
-            "@value": {
-                "@type": "koral:group",
-                "relation": "and",
-                "operands": [
-                    {
-                        "@type": "koral:group",
-                        "comment": "other values can be 'since','until' in combination with a simple korap:term",
-                        "relation": "between",
-                        "field": "koral:field#pubDate",
-                        "operands": [
-                            {
-                                "@type": "koral:date",
-                                "comment": "either long value or String representation '2013-04-29'",
-                                "@value": "2011-04-29"
-                            },
-                            {
-                                "@type": "koral:date",
-                                "@value": "2013-12-31"
-                            }
-                        ]
-                    },
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#textClass",
-                        "@value": "freizeit"
-                    }
-                ]
-            }
-        }
+          }
+        ]
+      }
     ]
+  },
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation": "operation:or",
+    "operands" : [
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:and",
+	"operands" : [
+	  {
+            "@type": "koral:doc",
+            "key": "textClass",
+            "value": "wissenschaft"
+	  },
+	  {
+	    "@type" : "koral:docGroup",
+	    "operation" : "operation:and",
+	    "operands": [
+              {
+		"@type": "koral:doc",
+		"key": "pubPlace",
+		"value": "Erfurt"
+              },
+              {
+		"@type": "koral:doc",
+		"key": "author",
+		"value": "Hesse"
+              }
+	    ]
+	  }
+	]
+      },
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:and",
+        "operands": [
+          {
+            "@type": "koral:docGroup",
+            "comment": "other values can be 'since','until' in combination with a simple korap:term",
+	    "operation" : "operation:and",
+            "operands": [
+              {
+                "@type": "koral:doc",
+		"type": "type:date",
+                "comment": "either long value or String representation '2013-04-29'",
+		"key" : "pubDate",
+		"match": "match:geq",
+                "value": "2011-04-29"
+              },
+              {
+                "@type": "koral:doc",
+		"type": "type:date",
+		"key" : "pubDate",
+		"match": "match:leq",
+                "value": "2013-12-31"
+              }
+            ]
+          },
+          {
+            "@type": "koral:doc",
+            "key": "textClass",
+            "value": "freizeit"
+          }
+        ]
+      }]
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+        "@type": "koral:term",
+        "@field": "koral:field#textClass",
+        "@value": "wissenschaft"
+      }
+    },
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-34345454",
+      "@value": {
+        "@type": "koral:group",
+        "relation": "and",
+        "operands": [
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#pubPlace",
+            "@value": "Erfurt"
+          },
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#author",
+            "@value": "Hesse"
+          }
+        ]
+      }
+    },
+    {
+      "@type": "koral:meta-extend",
+      "@value": {
+        "@type": "koral:group",
+        "relation": "and",
+        "operands": [
+          {
+            "@type": "koral:group",
+            "comment": "other values can be 'since','until' in combination with a simple korap:term",
+            "relation": "between",
+            "field": "koral:field#pubDate",
+            "operands": [
+              {
+                "@type": "koral:date",
+                "comment": "either long value or String representation '2013-04-29'",
+                "@value": "2011-04-29"
+              },
+              {
+                "@type": "koral:date",
+                "@value": "2013-12-31"
+              }
+            ]
+          },
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#textClass",
+            "@value": "freizeit"
+          }
+        ]
+      }
+    }
+  ]
 }
diff --git a/src/test/resources/queries/metaquery2.jsonld b/src/test/resources/queries/metaquery2.jsonld
index f7c906a..2586b06 100644
--- a/src/test/resources/queries/metaquery2.jsonld
+++ b/src/test/resources/queries/metaquery2.jsonld
@@ -76,5 +76,23 @@
         ]
       }
     }
-  ]
+  ],
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation": "operation:and",
+    "operands" : [
+      {
+	"@type" : "koral:doc",
+	"key" : "author",
+	"value" : "Hesse"
+      },
+      {
+	"@type" : "koral:doc",
+	"key" : "pubDate",
+	"type" : "type:date",
+	"match" : "match:leq",
+	"value" : "2013-12-05"
+      }
+    ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery3.jsonld b/src/test/resources/queries/metaquery3.jsonld
index a9fca44..5fbd487 100644
--- a/src/test/resources/queries/metaquery3.jsonld
+++ b/src/test/resources/queries/metaquery3.jsonld
@@ -1,5 +1,5 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
   "meta":{
     "startPage" : 2,
     "count" : 5,
@@ -7,47 +7,47 @@
       "left" : [ "token", 3 ],
       "right" : [ "char", 6 ]
     }
-},
-   "query":{
-      "@type":"koral:group",
-      "operation":"operation:or",
-      "operands":[
-         {
+  },
+  "query":{
+    "@type":"koral:group",
+    "operation":"operation:or",
+    "operands":[
+      {
+        "@type":"koral:token",
+        "wrap":{
+          "@type":"koral:term",
+	  "foundry" : "mate",
+          "layer":"l",
+	  "key":"Vokal",
+          "match":"match:eq"
+        }
+      },
+      {
+        "@type":"koral:group",
+	"operation" : "operation:sequence",
+        "operands":[
+          {
             "@type":"koral:token",
             "wrap":{
-               "@type":"koral:term",
-	        "foundry" : "mate",
-               "layer":"l",
-	       "key":"Vokal",
-               "match":"match:eq"
+              "@type":"koral:term",
+	      "foundry" : "mate",
+              "layer":"l",
+	      "key" : "der",
+              "match":"match:eq"
             }
-         },
-         {
-            "@type":"koral:group",
-	   "operation" : "operation:sequence",
-            "operands":[
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-		     "foundry" : "mate",
-                     "layer":"l",
-		     "key" : "der",
-                     "match":"match:eq"
-                  }
-               },
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-                     "foundry":"mate",
-		      "layer" : "p",
-		      "key" : "ADJA",
-                     "match":"match:eq"
-                  }
-               }
-            ]
-         }
-      ]
-   }
+          },
+          {
+            "@type":"koral:token",
+            "wrap":{
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "p",
+	      "key" : "ADJA",
+              "match":"match:eq"
+            }
+          }
+        ]
+      }
+    ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery7.jsonld b/src/test/resources/queries/metaquery7.jsonld
index 0b664ed..0c6ce9e 100644
--- a/src/test/resources/queries/metaquery7.jsonld
+++ b/src/test/resources/queries/metaquery7.jsonld
@@ -1,60 +1,98 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "meta":{
-	"startPage" : 1,
-	"count" : 5,
-	"context" : {
-	    "left" : [ "token", 3 ],
-	    "right" : [ "char", 6 ]
-	}
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "meta":{
+    "startPage" : 1,
+    "count" : 5,
+    "context" : {
+      "left" : [ "token", 3 ],
+      "right" : [ "char", 6 ]
+    }
+  },
+  "query":{
+    "@type":"koral:token",
+    "wrap":{
+      "@type":"koral:term",
+      "foundry":"mate",
+      "layer":"l",
+      "key":"lediglich"
+    }
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#corpusID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "c-1"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "c-2"
+	  }
+	]
+      }
     },
-    "query":{
-	"@type":"koral:token",
-	"wrap":{
-	    "@type":"koral:term",
-	    "foundry":"mate",
-	    "layer":"l",
-	    "key":"lediglich"
-	}
-    },
-    "collections": [
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#corpusID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "c-1"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "c-2"
-		    }
-		]
-	    }
-	},
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "and",
-		"@field": "koral:field#corpusID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "d-1"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "d-2"
-		    }
-		]
-	    }
-	}
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "and",
+	"@field": "koral:field#corpusID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "d-1"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "d-2"
+	  }
+	]
+      }
+    }
+  ],
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation" : "operation:and",
+    "operands" : [
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:or",
+	"operands" : [
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "c-1"
+	  },
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "c-2"
+	  }
+	]
+      },
+      {
+        "@type" : "koral:docGroup",
+	"operation" : "operation:and",
+	"operands" : [
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "d-1"
+	  },
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "d-2"
+	  }
+	]
+      }
     ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery9.jsonld b/src/test/resources/queries/metaquery9.jsonld
index 5a812ec..a89b584 100644
--- a/src/test/resources/queries/metaquery9.jsonld
+++ b/src/test/resources/queries/metaquery9.jsonld
@@ -1,12 +1,17 @@
 {
-    "collections":[
-	{
-	    "@type":"koral:meta-filter",
-	    "@value":{
-		"@type":"koral:term",
-		"@field":"koral:field#corpusID",
-		"@value":"WPD"
-	    }
-	}
-    ]
+  "collections":[
+    {
+      "@type":"koral:meta-filter",
+      "@value":{
+	"@type":"koral:term",
+	"@field":"koral:field#corpusID",
+	"@value":"WPD"
+      }
+    }
+  ],
+  "collection" : {
+    "@type" : "koral:doc",
+    "key" : "corpusID",
+    "value" : "WPD"
+  }
 }