Nested meta now working
diff --git a/src/test/resources/queries/bsp-class.jsonld b/src/test/resources/queries/bsp-class.jsonld
index f036535..075f927 100644
--- a/src/test/resources/queries/bsp-class.jsonld
+++ b/src/test/resources/queries/bsp-class.jsonld
@@ -33,4 +33,5 @@
}
]
},
- "meta":[{"@type":"korap:meta-filter","@value":{"@type":"korap:term","@field":"korap:field#corpusID","@value":"WPD"}}],"startPage":1,"count":50,"context":{"left":["token",6],"right":["token",6]}}
+ "collections":[{"@type":"korap:meta-filter","@value":{"@type":"korap:term","@field":"korap:field#corpusID","@value":"WPD"}}],
+ "meta":{"startPage":1,"count":50,"context":{"left":["token",6],"right":["token",6]}}}
diff --git a/src/test/resources/queries/bsp-context-2.jsonld b/src/test/resources/queries/bsp-context-2.jsonld
index 576d2f6..605811a 100644
--- a/src/test/resources/queries/bsp-context-2.jsonld
+++ b/src/test/resources/queries/bsp-context-2.jsonld
@@ -1,4 +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",
"query":{
"@type":"korap:token",
"wrap":{
@@ -9,7 +10,7 @@
"match":"match:eq"
}
},
- "meta":[
+ "collections":[
{
"@type":"korap:meta-filter",
"@value":{
@@ -19,6 +20,8 @@
}
}
],
+ "meta":{
"startPage":1,
"count":25,
"context":{"left":["char",210],"right":["char",210]},"cutOff":true}
+}
\ No newline at end of file
diff --git a/src/test/resources/queries/bsp-context.jsonld b/src/test/resources/queries/bsp-context.jsonld
index 327b8be..cd1ed3e 100644
--- a/src/test/resources/queries/bsp-context.jsonld
+++ b/src/test/resources/queries/bsp-context.jsonld
@@ -10,8 +10,10 @@
"match": "match:eq"
}
},
- "context":{
- "left":["char",90],
- "right":["char",90]
- }
+ "meta":{
+ "context":{
+ "left":["char",90],
+ "right":["char",90]
+ }
+ }
}
diff --git a/src/test/resources/queries/bsp-cutoff.jsonld b/src/test/resources/queries/bsp-cutoff.jsonld
index fea64b8..6c8da96 100644
--- a/src/test/resources/queries/bsp-cutoff.jsonld
+++ b/src/test/resources/queries/bsp-cutoff.jsonld
@@ -10,11 +10,13 @@
"match": "match:eq"
}
},
- "startPage":2,
- "count": 2,
- "cutOff": true,
- "context":{
- "left":["char",90],
- "right":["char",90]
- }
+ "meta":{
+ "startPage":2,
+ "count": 2,
+ "cutOff": true,
+ "context":{
+ "left":["char",90],
+ "right":["char",90]
+ }
+}
}
diff --git a/src/test/resources/queries/bsp-fail1.jsonld b/src/test/resources/queries/bsp-fail1.jsonld
index d39a792..7425bc1 100644
--- a/src/test/resources/queries/bsp-fail1.jsonld
+++ b/src/test/resources/queries/bsp-fail1.jsonld
@@ -21,5 +21,7 @@
}
],
},
+ "meta":{
"startIndex": -2
+ }
}
diff --git a/src/test/resources/queries/bsp-fail2.jsonld b/src/test/resources/queries/bsp-fail2.jsonld
index 417083e..dc4ace2 100644
--- a/src/test/resources/queries/bsp-fail2.jsonld
+++ b/src/test/resources/queries/bsp-fail2.jsonld
@@ -23,6 +23,8 @@
}
]
},
- "count": 100,
- "startPage": 1000
+ "meta":{
+ "count": 100,
+ "startPage": 1000
+ }
}
diff --git a/src/test/resources/queries/bsp-paging.jsonld b/src/test/resources/queries/bsp-paging.jsonld
index b410ea2..9e258cc 100644
--- a/src/test/resources/queries/bsp-paging.jsonld
+++ b/src/test/resources/queries/bsp-paging.jsonld
@@ -10,10 +10,12 @@
"match": "match:eq"
}
},
- "startPage":2,
- "count": 5,
- "context":{
- "left":["char",90],
- "right":["char",90]
+ "meta":{
+ "startPage":2,
+ "count": 5,
+ "context":{
+ "left":["char",90],
+ "right":["char",90]
+ }
}
}
diff --git a/src/test/resources/queries/bsp1b.jsonld b/src/test/resources/queries/bsp1b.jsonld
index 2a2631c..4cec26c 100644
--- a/src/test/resources/queries/bsp1b.jsonld
+++ b/src/test/resources/queries/bsp1b.jsonld
@@ -42,7 +42,7 @@
}
]
},
- "meta":{
+ "poliqarp-meta":{
"@type":"korap:meta",
"@value":{
"@type":"korap:group",
diff --git a/src/test/resources/queries/metaquery.jsonld b/src/test/resources/queries/metaquery.jsonld
new file mode 100644
index 0000000..5b2ae44
--- /dev/null
+++ b/src/test/resources/queries/metaquery.jsonld
@@ -0,0 +1,115 @@
+{
+ "@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":"korap:group",
+ "operation":"operation:or",
+ "operands":[
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "lemma",
+ "key" : "Vokal",
+ "match":"match:eq"
+ }
+ },
+ {
+ "@type":"korap:group",
+ "operation": "operation:sequence",
+ "operands":[
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "base",
+ "key" : "der",
+ "match":"match:eq"
+ }
+ },
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "pos",
+ "key" : "ADJA",
+ "match":"match:eq"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "collections": [
+ {
+ "@type": "korap:meta-filter",
+ "@id": "korap-filter#id-1223232",
+ "@value": {
+ "@type": "korap:term",
+ "@field": "korap:field#textClass",
+ "@value": "wissenschaft"
+ }
+ },
+ {
+ "@type": "korap:meta-filter",
+ "@id": "korap-filter#id-34345454",
+ "@value": {
+ "@type": "korap:group",
+ "relation": "and",
+ "operands": [
+ {
+ "@type": "korap:term",
+ "@field": "korap:field#pubPlace",
+ "@value": "Erfurt"
+ },
+ {
+ "@type": "korap:term",
+ "@field": "korap:field#author",
+ "@value": "Hesse"
+ }
+ ]
+ }
+ },
+ {
+ "@type": "korap:meta-extend",
+ "@value": {
+ "@type": "korap:group",
+ "relation": "and",
+ "operands": [
+ {
+ "@type": "korap:group",
+ "comment": "other values can be 'since','until' in combination with a simple korap:term",
+ "relation": "between",
+ "field": "korap:field#pubDate",
+ "operands": [
+ {
+ "@type": "korap:date",
+ "comment": "either long value or String representation '2013-04-29'",
+ "@value": "2011-04-29"
+ },
+ {
+ "@type": "korap:date",
+ "@value": "2013-12-31"
+ }
+ ]
+ },
+ {
+ "@type": "korap:term",
+ "@field": "korap:field#textClass",
+ "@value": "freizeit"
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/src/test/resources/queries/metaquery2.jsonld b/src/test/resources/queries/metaquery2.jsonld
new file mode 100644
index 0000000..e1d4690
--- /dev/null
+++ b/src/test/resources/queries/metaquery2.jsonld
@@ -0,0 +1,80 @@
+{
+ "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "meta":{
+ "startPage" : 2,
+ "count" : 5,
+ "context" : {
+ "left" : [ "token", 6 ],
+ "right" : [ "token", 6 ]
+ }
+ },
+ "query":{
+ "@type":"korap:group",
+ "operation":"operation:or",
+ "operands":[
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "lemma",
+ "key" : "Vokal",
+ "match":"match:eq"
+ }
+ },
+ {
+ "@type":"korap:group",
+ "operation" : "operation:sequence",
+ "operands":[
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "lemma",
+ "key" : "der",
+ "match":"match:eq"
+ }
+ },
+ {
+ "@type":"korap:token",
+ "wrap":{
+ "@type":"korap:term",
+ "foundry":"mate",
+ "layer" : "p",
+ "key" : "ADJD",
+ "match":"match:eq"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "collections": [
+ {
+ "@type": "korap:meta-filter",
+ "@value": {
+ "@type": "korap:group",
+ "relation": "and",
+ "operands": [
+ {
+ "@type": "korap:term",
+ "@field": "korap:field#author",
+ "@value": "Hesse"
+ },
+ {
+ "@type": "korap:group",
+ "@field": "korap:field#pubDate",
+ "relation": "until",
+ "operands": [
+ {
+ "@type": "korap:date",
+ "@value": "2013-12-05"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/src/test/resources/queries/metaquery3.jsonld b/src/test/resources/queries/metaquery3.jsonld
index 0f7f3dd..adedda0 100644
--- a/src/test/resources/queries/metaquery3.jsonld
+++ b/src/test/resources/queries/metaquery3.jsonld
@@ -1,11 +1,13 @@
{
"@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":"korap:group",
"operation":"operation:or",
diff --git a/src/test/resources/queries/metaquery4.jsonld b/src/test/resources/queries/metaquery4.jsonld
index 7da685d..3fe71ed 100644
--- a/src/test/resources/queries/metaquery4.jsonld
+++ b/src/test/resources/queries/metaquery4.jsonld
@@ -1,10 +1,12 @@
{
"@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
- "startPage" : 1,
- "count" : 5,
- "context" : {
- "left" : [ "token", 3 ],
- "right" : [ "char", 6 ]
+ "meta":{
+ "startPage" : 1,
+ "count" : 5,
+ "context" : {
+ "left" : [ "token", 3 ],
+ "right" : [ "char", 6 ]
+ }
},
"query":{
"@type":"korap:token",
@@ -16,7 +18,7 @@
"match":"match:eq"
}
},
- "meta": [
+ "collections": [
{
"@type": "korap:meta-filter",
"@id": "korap-filter#id-1223232",
diff --git a/src/test/resources/queries/metaquery5.jsonld b/src/test/resources/queries/metaquery5.jsonld
index 497494e..7fc5b85 100644
--- a/src/test/resources/queries/metaquery5.jsonld
+++ b/src/test/resources/queries/metaquery5.jsonld
@@ -1,10 +1,12 @@
{
"@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
- "startPage" : 1,
- "count" : 5,
- "context" : {
- "left" : [ "token", 3 ],
- "right" : [ "char", 6 ]
+ "meta":{
+ "startPage" : 1,
+ "count" : 5,
+ "context" : {
+ "left" : [ "token", 3 ],
+ "right" : [ "char", 6 ]
+ }
},
"query":{
"@type":"korap:token",
@@ -16,7 +18,7 @@
"match":"match:eq"
}
},
- "meta": [
+ "collections": [
{
"@type": "korap:meta-filter",
"@id": "korap-filter#id-1223232",
diff --git a/src/test/resources/queries/metaquery6.jsonld b/src/test/resources/queries/metaquery6.jsonld
index 5acb266..0e4c30f 100644
--- a/src/test/resources/queries/metaquery6.jsonld
+++ b/src/test/resources/queries/metaquery6.jsonld
@@ -1,10 +1,12 @@
{
"@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
- "startPage" : 1,
- "count" : 5,
- "context" : {
- "left" : [ "token", 3 ],
- "right" : [ "char", 6 ]
+ "meta":{
+ "startPage" : 1,
+ "count" : 5,
+ "context" : {
+ "left" : [ "token", 3 ],
+ "right" : [ "char", 6 ]
+ }
},
"query":{
"@type":"korap:token",
@@ -15,7 +17,7 @@
"key":"lediglich"
}
},
- "meta": [
+ "collections": [
{
"@type": "korap:meta-filter",
"@id": "korap-filter#id-1223232",