Added temporary class mechanism for relation spans.
Includes 2 errors regarding snippet brackets / highlighting.
Change-Id: If993b6ab74bd9a61a64cc660bc8f29dd933e8714
diff --git a/src/test/resources/queries/relation/focus-empty-both.json b/src/test/resources/queries/relation/focus-empty-both.json
new file mode 100644
index 0000000..1e9fa16
--- /dev/null
+++ b/src/test/resources/queries/relation/focus-empty-both.json
@@ -0,0 +1,39 @@
+{
+ "query": {
+ "@type": "koral:reference",
+ "operation": "operation:focus",
+ "classRef": [2],
+ "operands": [{
+ "@type": "koral:group",
+ "operation": "operation:relation",
+ "operands": [
+ {
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 1,
+ "operands": [{
+ "@type": "koral:token"
+ }]
+ },
+ {
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 2,
+ "operands": [{
+ "@type": "koral:token"
+ }]
+ }
+ ],
+ "relation": {
+ "@type": "koral:relation",
+ "wrap": {
+ "@type": "koral:term",
+ "foundry": "mate",
+ "layer": "d",
+ "key": "HEAD"
+ }
+ }
+ }]
+ },
+ "meta": {}
+}
diff --git a/src/test/resources/queries/relation/focus-empty-target.json b/src/test/resources/queries/relation/focus-empty-target.json
new file mode 100644
index 0000000..78ac125
--- /dev/null
+++ b/src/test/resources/queries/relation/focus-empty-target.json
@@ -0,0 +1,42 @@
+{
+ "query": {
+ "@type": "koral:reference",
+ "operation": "operation:focus",
+ "classRef": [2],
+ "operands": [{
+ "@type": "koral:group",
+ "operation": "operation:relation",
+ "operands": [
+ {
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 1,
+ "operands": [{
+ "@type": "koral:span",
+ "layer": "c",
+ "key": "s",
+ "match": "match:eq"
+ }]
+ },
+ {
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 2,
+ "operands": [{
+ "@type": "koral:token"
+ }]
+ }
+ ],
+ "relation": {
+ "@type": "koral:relation",
+ "wrap": {
+ "@type": "koral:term",
+ "foundry": "mate",
+ "layer": "d",
+ "key": "HEAD"
+ }
+ }
+ }]
+ },
+ "meta": {}
+}
diff --git a/src/test/resources/queries/relation/focus-source.json b/src/test/resources/queries/relation/focus-source.json
index d934a3b..68d5ce4 100644
--- a/src/test/resources/queries/relation/focus-source.json
+++ b/src/test/resources/queries/relation/focus-source.json
@@ -11,8 +11,15 @@
"@type": "koral:token"
},
{
- "@type": "koral:span",
- "key": "np"
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 1,
+ "operands": [{
+ "@type": "koral:span",
+ "layer": "c",
+ "key": "np",
+ "match": "match:eq"
+ }]
}
],
"relation": {
diff --git a/src/test/resources/queries/relation/focus-target.json b/src/test/resources/queries/relation/focus-target.json
index daec972..46282a8 100644
--- a/src/test/resources/queries/relation/focus-target.json
+++ b/src/test/resources/queries/relation/focus-target.json
@@ -8,11 +8,26 @@
"operation": "operation:relation",
"operands": [
{
- "@type": "koral:span",
- "key": "s"
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 1,
+ "operands": [{
+ "@type": "koral:span",
+ "layer": "c",
+ "key": "s",
+ "match": "match:eq"
+ }]
},
{
- "@type": "koral:token"
+ "@type": "koral:group",
+ "operation": "operation:class",
+ "classOut": 2,
+ "operands": [{
+ "@type": "koral:span",
+ "layer": "c",
+ "key": "np",
+ "match": "match:eq"
+ }]
}
],
"relation": {