More tests on deserialized sequences
diff --git a/src/test/resources/queries/sequence/empty-first-repetition-2.jsonld b/src/test/resources/queries/sequence/empty-first-repetition-2.jsonld
new file mode 100644
index 0000000..c84cc4c
--- /dev/null
+++ b/src/test/resources/queries/sequence/empty-first-repetition-2.jsonld
@@ -0,0 +1,43 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "collections" : [
+ {
+ "@type" : "korap:meta-filter",
+ "@value" : {
+ "@field" : "korap:field#corpusID",
+ "@type" : "korap:term",
+ "@value" : "WPD"
+ }
+ }
+ ],
+ "meta" : {},
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 0,
+ "max" : 0
+ },
+ "operands" : [
+ {
+ "@type" : "korap:token"
+ }]
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-first-repetition-2.jsonld b/src/test/resources/queries/sequence/negative-first-repetition-2.jsonld
new file mode 100644
index 0000000..ded4793
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-first-repetition-2.jsonld
@@ -0,0 +1,40 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 0,
+ "max" : 5
+ },
+ "operands" : [
+ {
+
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }]
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-first-repetition-3.jsonld b/src/test/resources/queries/sequence/negative-first-repetition-3.jsonld
new file mode 100644
index 0000000..7ab3c24
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-first-repetition-3.jsonld
@@ -0,0 +1,40 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 0,
+ "max" : 0
+ },
+ "operands" : [
+ {
+
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }]
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-first-repetition.jsonld b/src/test/resources/queries/sequence/negative-first-repetition.jsonld
new file mode 100644
index 0000000..63df1bf
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-first-repetition.jsonld
@@ -0,0 +1,40 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 4,
+ "max" : 5
+ },
+ "operands" : [
+ {
+
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }]
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-first.jsonld b/src/test/resources/queries/sequence/negative-first.jsonld
new file mode 100644
index 0000000..5f4a130
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-first.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-last-class-repetition-2.jsonld b/src/test/resources/queries/sequence/negative-last-class-repetition-2.jsonld
new file mode 100644
index 0000000..4d93449
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-last-class-repetition-2.jsonld
@@ -0,0 +1,47 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ },
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 4,
+ "max" : 5
+ },
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "class" : 2,
+ "operation" : "operation:class",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-last-class-repetition.jsonld b/src/test/resources/queries/sequence/negative-last-class-repetition.jsonld
new file mode 100644
index 0000000..372e390
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-last-class-repetition.jsonld
@@ -0,0 +1,47 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ },
+ {
+ "@type" : "korap:group",
+ "class" : 2,
+ "operation" : "operation:class",
+ "operands" : [
+ {
+ "@type" : "korap:group",
+ "operation" : "operation:repetition",
+ "boundary": {
+ "@type" : "korap:boundary",
+ "min" : 4,
+ "max" : 5
+ },
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-last-class.jsonld b/src/test/resources/queries/sequence/negative-last-class.jsonld
new file mode 100644
index 0000000..41e0d45
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-last-class.jsonld
@@ -0,0 +1,36 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ },
+ {
+ "@type" : "korap:group",
+ "class" : 2,
+ "operation" : "operation:class",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }
+ ]
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative-last.jsonld b/src/test/resources/queries/sequence/negative-last.jsonld
new file mode 100644
index 0000000..7b29c8b
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative-last.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:group",
+ "operands" : [
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:eq"
+ }
+ },
+ {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }
+ ],
+ "operation" : "operation:sequence"
+ }
+}
diff --git a/src/test/resources/queries/sequence/negative.jsonld b/src/test/resources/queries/sequence/negative.jsonld
new file mode 100644
index 0000000..c0f5c21
--- /dev/null
+++ b/src/test/resources/queries/sequence/negative.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context" : "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+ "query" : {
+ "@type" : "korap:token",
+ "wrap" : {
+ "@type" : "korap:term",
+ "foundry" : "tt",
+ "key" : "NN",
+ "layer" : "p",
+ "match" : "match:ne"
+ }
+ }
+}