Refactored test suite to have a single query interpretation function in TestSimple
Change-Id: I9e739446c67344f009e9178ee6bdb86dd4ce7687
diff --git a/src/test/java/de/ids_mannheim/korap/TestSimple.java b/src/test/java/de/ids_mannheim/korap/TestSimple.java
index 91b54d5..e83891d 100644
--- a/src/test/java/de/ids_mannheim/korap/TestSimple.java
+++ b/src/test/java/de/ids_mannheim/korap/TestSimple.java
@@ -96,18 +96,10 @@
// Get query wrapper based on json file
- public static SpanQueryWrapper getJSONQuery (String jsonFile) throws QueryException {
+ public static SpanQueryWrapper getJsonQuery (String jsonFile) throws QueryException {
SpanQueryWrapper sqwi;
-
-// try {
- String json = getJsonString(jsonFile);
- sqwi = new KrillQuery("tokens").fromKoral(json);
-// }
-// catch (QueryException e) {
-// //fail(e.getMessage());
-// log.error(e.getMessage());
-// sqwi = new QueryBuilder("tokens").seg("???");
-// };
+ String json = getJsonString(jsonFile);
+ sqwi = new KrillQuery("tokens").fromKoral(json);
return sqwi;
};
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index 82b1dcb..ae9d26f 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -245,7 +245,7 @@
ki.commit();
String jsonPath = getClass().getResource("/queries/cosmas1.json").getFile();
- SpanQueryWrapper sqwi = jsonQuery(jsonPath);
+ SpanQueryWrapper sqwi = getJsonQuery(jsonPath);
kr = ki.search(sqwi.toQuery(), (short) 10);
assertEquals((long) 3, kr.getTotalResults());
@@ -274,7 +274,7 @@
String jsonPath = getClass()
.getResource("/queries/distances/in-same-t.jsonld").getFile();
- sqwi = jsonQuery(jsonPath);
+ sqwi = getJsonQuery(jsonPath);
assertEquals(
"spanElementDistance(tokens:s:c, tokens:s:e, [(base/s:t[0:0], ordered, notExcluded)])",
@@ -284,20 +284,4 @@
assertEquals(1, kr.getTotalResults()); // Is 1 correct or should it not be ordered?
assertEquals("[[ec]]ebdc", kr.getMatch(0).getSnippetBrackets());
}
-
- // TODO:
- // probably replace with getJSONQuery()
- public static SpanQueryWrapper jsonQuery (String jsonFile) {
- SpanQueryWrapper sqwi;
-
- try {
- String json = getJsonString(jsonFile);
- sqwi = new KrillQuery("tokens").fromKoral(json);
- }
- catch (QueryException e) {
- fail(e.getMessage());
- sqwi = new QueryBuilder("tokens").seg("???");
- }
- return sqwi;
- }
}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
index 8edb8be..c08535e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -1,7 +1,6 @@
package de.ids_mannheim.korap.index;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
-import static de.ids_mannheim.korap.TestSimple.getJsonString;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
@@ -265,7 +264,7 @@
ki.commit();
// treat merging gracefully
- SpanQueryWrapper sqw = getJSONQuery(
+ SpanQueryWrapper sqw = getJsonQuery(
getClass().getResource("/queries/bugs/cosmas_wildcards_missingfoundry.jsonld")
.getFile());
SpanQuery sq = sqw.toQuery();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
index b5d3412..4e01093 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.index;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
@@ -92,7 +92,7 @@
String filepath = getClass()
.getResource("/queries/reference/distance-reference.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// cat="vb" & cat="prp" & cat="nn" & #1 .{0,1} #2 & #1
@@ -187,7 +187,7 @@
.getResource(
"/queries/reference/distance-multiple-references.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// 'cat="vb" & cat="prp" & cat="nn" & #1 .{0,1} #2 & #1 .{0,2}
@@ -226,7 +226,7 @@
String filepath = getClass()
.getResource("/queries/reference/distance-reference.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
kr = ki.search(sq, (short) 10);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSampleIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSampleIndex.java
index cb82830..b98b791 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSampleIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSampleIndex.java
@@ -1,7 +1,6 @@
package de.ids_mannheim.korap.index;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
-import static de.ids_mannheim.korap.TestSimple.getJsonString;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
@@ -75,7 +74,7 @@
String filepath = getClass()
.getResource("/queries/relation/lemma-bug.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
kr = sample.search(sq, (short) 10);
@@ -121,7 +120,7 @@
assertEquals(4, kr.getMatches().size());
// check SpanQueryWrapper generated query
- SpanQueryWrapper sqwi = getJSONQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bugs/cosmas_wildcards.jsonld")
.getFile());
SpanQuery jsq = sqwi.toQuery();
@@ -131,7 +130,7 @@
@Test
public void testWildcardsWithJson () throws IOException, QueryException {
- SpanQueryWrapper sqwi = getJSONQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/cosmas_wildcards_all.jsonld")
.getFile());
SpanQuery sq = sqwi.toQuery();
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
index 3d65c62..f867b5c 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
@@ -22,7 +22,7 @@
@Test
public void queryJSONBsp1 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp1.jsonld").getFile());
// There is a repetition in here
@@ -35,7 +35,7 @@
@Test
public void queryJSONBsp1Disjunction () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp1c.jsonld").getFile());
// There is a repetition in here
@@ -49,7 +49,7 @@
@Test
public void queryJSONBsp1b () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp1b.jsonld").getFile());
// [base=foo]|([base=foo][base=bar]) meta author=Goethe&year=1815
@@ -60,7 +60,7 @@
@Test
public void queryJSONBsp2 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp2.jsonld").getFile());
// ([base=foo]|[base=bar])[base=foobar]
@@ -71,7 +71,7 @@
@Test
public void queryJSONBsp3 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp3.jsonld").getFile());
// focus({[base=Mann]})
@@ -82,7 +82,7 @@
@Test
public void queryJSONBsp4 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp4.jsonld").getFile());
// focus({[base=foo]}[orth=bar])
@@ -93,7 +93,7 @@
@Test
public void queryJSONBsp5 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp5.jsonld").getFile());
// focus(1:[base=Der]{1:[base=Mann]})
@@ -104,7 +104,7 @@
@Test
public void queryJSONBsp6 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp6.jsonld").getFile());
// [base=katze]
@@ -114,7 +114,7 @@
@Test
public void queryJSONBsp7 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp7.jsonld").getFile());
// [!base=Katze]
@@ -125,7 +125,7 @@
@Test
public void queryJSONBsp9 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp9.jsonld").getFile());
// [base=Katze&orth=Katzen]
@@ -136,7 +136,7 @@
@Test
public void queryJSONBsp9b () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp9b.jsonld").getFile());
// [base=Katze&orth=Katzen]
@@ -147,7 +147,7 @@
@Test
public void queryJSONBsp10 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp10.jsonld").getFile());
// [base=Katze][orth=und][orth=Hunde]
@@ -158,7 +158,7 @@
@Test
public void queryJSONBsp11 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp11.jsonld").getFile());
// [base!=Katze | orth!=Katzen]
@@ -175,7 +175,7 @@
@Test
public void queryJSONBsp12 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp12.jsonld").getFile());
// contains(<np>,[base=Mann])
@@ -186,7 +186,7 @@
@Test
public void queryJSONBsp13 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp13.jsonld").getFile());
assertEquals(sqwi.toQuery().toString(),
@@ -196,7 +196,7 @@
@Test
public void queryJSONBsp13b () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp13b.jsonld").getFile());
// startswith(<np>,[pos=Det])
@@ -207,7 +207,7 @@
@Test
public void queryJSONBsp14 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp14.jsonld").getFile());
// 'vers{2,3}uch'
@@ -218,7 +218,7 @@
@Test
public void queryJSONBsp15 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp15.jsonld").getFile());
// [orth='vers.*ch']
@@ -229,7 +229,7 @@
@Test
public void queryJSONBsp16 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp16.jsonld").getFile());
// [(base=bar|base=foo)&orth=foobar]
@@ -240,7 +240,7 @@
@Test
public void queryJSONBsp17 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp17.jsonld").getFile());
// within(<np>,[base=Mann])
@@ -260,7 +260,7 @@
@Test
public void queryJSONBspClass () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bsp-class.jsonld").getFile());
// within(<np>,[base=Mann])
@@ -271,7 +271,7 @@
@Test
public void queryJSONcosmas3 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas3.json").getFile());
// "das /+w1:3 Buch"
@@ -282,7 +282,7 @@
@Test
public void queryJSONcosmas4 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas4.json").getFile());
// "das /+w1:3,s1:1 Buch"
@@ -293,7 +293,7 @@
@Test
public void queryJSONcosmas4b () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas4b.json").getFile());
// "das /+w1:3,s1 Buch"
@@ -304,7 +304,7 @@
@Test
public void queryJSONcosmas10 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas10.json").getFile());
// "Institut für $deutsche Sprache"
@@ -315,7 +315,7 @@
@Test
public void queryJSONcosmas10b () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas10b.json").getFile());
// "Institut $FÜR $deutsche Sprache"
@@ -326,7 +326,7 @@
@Test
public void queryJSONcosmas16 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas16.json").getFile());
// "$wegen #IN(L) <s>"
@@ -337,7 +337,7 @@
@Test
public void queryJSONcosmas17 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas17.json").getFile());
// "#BED($wegen , +sa)"
@@ -348,7 +348,7 @@
@Test
public void queryJSONcosmas20 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/cosmas20.json").getFile());
// "MORPH(V) #IN(R) #ELEM(S)"
@@ -359,7 +359,7 @@
@Test
public void queryJSONrepetition () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bsp-repetition.jsonld").getFile());
// der[cnx/p=A]{0,2}[tt/p=NN]
@@ -370,7 +370,7 @@
@Test
public void queryJSONboundaryBug () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bsp-boundary.jsonld").getFile());
// Tal []{1,} Wald
@@ -381,7 +381,7 @@
@Test
public void queryJSONcosmasBoundaryBug () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/cosmas_boundary.jsonld").getFile());
// Namen /s1 Leben
@@ -392,7 +392,7 @@
@Test
public void queryJSONfoundryForOrthBug () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/bugs/foundry_for_orth.jsonld")
.getFile());
@@ -403,7 +403,7 @@
@Test
public void queryJSONfoundryForOrthBug2 () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/foundry_for_orth_2.jsonld")
.getFile());
@@ -429,7 +429,7 @@
@Test
public void queryJSONspecialLayerBug () throws QueryException {
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/special_layer.jsonld").getFile());
assertEquals(sqwi.toQuery().toString(),
"spanNext(spanNext(spanNext(tokens:s:Baum, tokens:cnx/p:CC), tokens:tt/l:Baum), <tokens:xip/c:MC />)");
@@ -439,7 +439,7 @@
@Test
public void queryJSONrepetitionGroupRewriteBug () throws QueryException {
// ([cnx/p="A"][]){2}
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/repetition_group_rewrite.jsonld")
.getFile());
@@ -451,7 +451,7 @@
@Test
public void queryJSONoverlapsFrameWorkaround () throws QueryException {
// overlaps(<s>,[tt/p=CARD][tt/p="N.*"])
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/overlaps_frame_workaround.jsonld")
.getFile());
@@ -463,7 +463,7 @@
@Test
public void queryJSONflags1 () throws QueryException {
// buchstabe/i
- SpanQueryWrapper sqwi = jsonQuery(
+ SpanQueryWrapper sqwi = getJsonQuery(
getClass().getResource("/queries/flags/caseInsensitive.jsonld")
.getFile());
@@ -474,7 +474,7 @@
@Test
public void queryJSONspanWrapDeserializationBug () throws QueryException {
// contains(<s>, Erde []* Sonne)
- SpanQueryWrapper sqwi = jsonQuery(getClass()
+ SpanQueryWrapper sqwi = getJsonQuery(getClass()
.getResource("/queries/bugs/unspecified_key_bug.jsonld")
.getFile());
@@ -611,20 +611,4 @@
"spanNext(tokens:s:der, tokens:s:Baum)");
assertEquals(kq.getWarning(0).getCode(), 774);
};
-
-
- // TODO: Probably replace with getJSONQuery
- public static SpanQueryWrapper jsonQuery (String jsonFile) {
- SpanQueryWrapper sqwi;
-
- try {
- String json = getJsonString(jsonFile);
- sqwi = new KrillQuery("tokens").fromKoral(json);
- }
- catch (QueryException e) {
- fail(e.getMessage());
- sqwi = new QueryBuilder("tokens").seg("???");
- };
- return sqwi;
- };
};
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanReferenceQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanReferenceQueryJSON.java
index 844b8ec..1192296 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanReferenceQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanReferenceQueryJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
@@ -20,7 +20,7 @@
.getResource(
"/queries/reference/first-operand-reference.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// 'cat="V" & cat="NP" & cat="PP" & #2 . #1 & #1 ->dep #3 &
@@ -42,7 +42,7 @@
.getResource(
"/queries/reference/second-operand-reference.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// 'cat="V" & cat="NP" & cat="PP" & #2 . #1 & #1 ->dep #3 &
@@ -61,7 +61,7 @@
String filepath = getClass()
.getResource("/queries/reference/multiple-references.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// 'cat="VP" & cat="NP" & cat="PP" & #1 . #2 & #2 . #3 & #1 .
@@ -84,7 +84,7 @@
.getResource(
"/queries/reference/bug-multiple-distance-simple.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
@@ -95,7 +95,7 @@
filepath = getClass()
.getResource("/queries/reference/bug-multiple-distance.jsonld")
.getFile();
- sqwi = getJSONQuery(filepath);
+ sqwi = getJsonQuery(filepath);
sq = sqwi.toQuery();
// 'cat="VP" & cat="NP" & cat="PP" & #1 . #2 & #2 . #3 & #1 .
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
index 67acf96..16f7b33 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import org.apache.lucene.search.spans.SpanQuery;
@@ -23,7 +23,7 @@
String filepath = getClass()
.getResource("/queries/relation/any-source-with-attribute.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
@@ -40,7 +40,7 @@
String filepath = getClass()
.getResource("/queries/relation/any-target-with-attribute.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
// "focus(#[1,2]spanSegment(focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), "
@@ -63,7 +63,7 @@
.getResource(
"/queries/relation/specific-source-with-attribute.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
@@ -82,7 +82,7 @@
.getResource(
"/queries/relation/both-operands-with-attribute.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(spanElementWithAttribute(<tokens:c: />, "
@@ -99,7 +99,7 @@
//
String filepath = getClass()
.getResource("/queries/relation/match-source.json").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(spanRelation(tokens:>:mate/d:HEAD), <tokens:c:s />))",
@@ -112,7 +112,7 @@
String filepath = getClass()
.getResource("/queries/relation/match-source-token.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(spanRelation(tokens:>:malt/d:KONJ), tokens:tt/l:um))",
@@ -125,7 +125,7 @@
//
String filepath = getClass()
.getResource("/queries/relation/match-target.json").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(spanRelation(tokens:<:mate/d:HEAD), <tokens:c:vp />))",
@@ -139,7 +139,7 @@
String filepath = getClass()
.getResource("/queries/relation/match-source-and-target.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(<tokens:c:vp />, "
@@ -154,7 +154,7 @@
String filepath = getClass()
.getResource("/queries/relation/operand-with-property.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(<tokens:c:vp />, focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), "
@@ -169,7 +169,7 @@
String filepath = getClass()
.getResource("/queries/relation/operand-with-attribute.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(<tokens:c:vp />, focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), "
@@ -183,7 +183,7 @@
//
String filepath = getClass()
.getResource("/queries/relation/relation-only.json").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(#[1,2]spanRelation(tokens:>:mate/d:HEAD))",
sq.toString());
@@ -195,7 +195,7 @@
//
String filepath = getClass()
.getResource("/queries/relation/focus-source.json").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(1: focus(#[1,2]spanSegment(spanRelation(tokens:<:mate/d:HEAD), {1: <tokens:c:np />})))",
@@ -207,7 +207,7 @@
public void testFocusTarget () throws QueryException {
String filepath = getClass()
.getResource("/queries/relation/focus-target.json").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(2: focus(#[1,2]spanSegment({2: <tokens:c:np />}, "
@@ -221,7 +221,7 @@
String filepath = getClass()
.getResource("/queries/relation/focus-empty-target.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(2: focus(#[1,2]spanSegment({2: target:spanRelation(tokens:>:mate/d:HEAD)}, {1: <tokens:c:s />})))",
@@ -234,7 +234,7 @@
String filepath = getClass()
.getResource("/queries/relation/focus-empty-both.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(2: focus(#[1,2]{1: source:{2: target:spanRelation(tokens:>:mate/d:HEAD)}}))",
@@ -247,7 +247,7 @@
.getResource(
"/queries/relation/typed-relation-with-key-regex.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(#[1,2]spanSegment(<tokens:corenlp/c:NP />, "
+ "focus(#2: spanSegment(spanRelation(SpanMultiTermQueryWrapper(tokens:/>:malt/d:.*/)), "
@@ -265,7 +265,7 @@
.getResource(
"/queries/relation/typed-relation-without-key.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("tokens:???", sq.toString());
}
@@ -275,7 +275,7 @@
String filepath = getClass()
.getResource("/queries/relation/typed-relation-with-key.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(#[1,2]spanRelation(tokens:>:malt/d:PP))",
@@ -290,7 +290,7 @@
.getResource(
"/queries/relation/typed-relation-with-annotation-nodes.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(<tokens:corenlp/c:NP />, "
@@ -307,7 +307,7 @@
.getResource(
"/queries/relation/typed-relation-with-wrap-token-nodes.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(#[1,2]spanSegment(tokens:tt/p:VVINF, "
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
index 592b2d9..c04f2c7 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -402,7 +402,7 @@
@Test
public void queryJSONcosmas2Bug () throws QueryException {
- SpanQueryWrapper sqwi = getJSONQuery(getClass().getResource("/queries/bugs/cosmas_wildcards.jsonld").getFile());
+ SpanQueryWrapper sqwi = getJsonQuery(getClass().getResource("/queries/bugs/cosmas_wildcards.jsonld").getFile());
SpanQuery sq = sqwi.toQuery();
// meine* /+w1:2,s0 &Erfahrung
assertEquals(sq.toString(),"spanMultipleDistance({129: SpanMultiTermQueryWrapper(tokens:s:meine*)}, "+
@@ -416,6 +416,6 @@
// get query wrapper based on json file
public SpanQueryWrapper jsonQueryFile (String filename) throws QueryException {
- return getJSONQuery(getClass().getResource(path + filename).getFile());
+ return getJsonQuery(getClass().getResource(path + filename).getFile());
};
};
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
index f4ea2ce..886811f 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import org.apache.lucene.search.spans.SpanQuery;
@@ -19,7 +19,7 @@
// subspan(tokens:tt/l:Haus, 0, 1)
String filepath = getClass()
.getResource("/queries/submatch/termquery.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("tokens:tt/l:Haus", sq.toString());
}
@@ -31,7 +31,7 @@
String filepath = getClass()
.getResource("/queries/submatch/term-start-offset.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("tokens:tt/l:Haus", sq.toString());
}
@@ -42,7 +42,7 @@
// subspan(tokens:tt/l:Haus, 1, 1)
String filepath = getClass()
.getResource("/queries/submatch/term-null.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(null, sq);
}
@@ -54,7 +54,7 @@
String filepath = getClass()
.getResource("/queries/submatch/simpleElement.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan(spanContain(<tokens:s />, tokens:tt/l:Haus), 1, 4)",
@@ -67,7 +67,7 @@
// submatch(1,:<s>)
String filepath = getClass()
.getResource("/queries/submatch/noLength.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("subspan(<tokens:s />, 1, 0)", sq.toString());
}
@@ -78,7 +78,7 @@
// submatch(-1,4:<s>)
String filepath = getClass()
.getResource("/queries/submatch/minusStart.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("subspan(<tokens:s />, -1, 4)", sq.toString());
}
@@ -91,7 +91,7 @@
String filepath = getClass()
.getResource("/queries/submatch/empty-minusStart.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan(spanExpansion(tokens:s:der, []{1, 8}, right), -1, 4)",
@@ -105,7 +105,7 @@
// submatch(1,2:der []{1,8})
String filepath = getClass()
.getResource("/queries/submatch/empty-max.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan(spanExpansion(tokens:s:der, []{1, 8}, right), 1, 2)",
@@ -117,7 +117,7 @@
public void testCaseEmptyWrapped () throws QueryException {
String filepath = getClass()
.getResource("/queries/submatch/wrapped.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(129: spanElementDistance({129: tokens:s:der}, {129: subspan"
@@ -131,7 +131,7 @@
// die subspan(der []{1,}, 2,3)
String filepath = getClass()
.getResource("/queries/submatch/embedded.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanNext({1: tokens:s:die}, {1: subspan(spanExpansion("
@@ -147,7 +147,7 @@
String filepath = getClass()
.getResource("/queries/submatch/embedded-null.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("tokens:s:die", sq.toString());
}
@@ -159,7 +159,7 @@
String filepath = getClass()
.getResource("/queries/submatch/embedded-valid-empty.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:die, []{2, 5}, right)}))",
@@ -173,7 +173,7 @@
String filepath = getClass()
.getResource("/queries/submatch/negative-token.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("tokens:l:Baum", sq.toString());
}
@@ -184,7 +184,7 @@
// das submatch(0,1:[base != Baum])
String filepath = getClass()
.getResource("/queries/submatch/negative-seq.jsonld").getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right)}))",
@@ -198,7 +198,7 @@
String filepath = getClass()
.getResource("/queries/submatch/negative-sequence-class.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right, class:1)}))",
@@ -212,7 +212,7 @@
String filepath = getClass()
.getResource("/queries/submatch/embedded-negative-seq.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan(spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right), 1, 1)",
@@ -227,7 +227,7 @@
.getResource(
"/queries/submatch/embedded-negative-class-seq.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan({1: spanExpansion(tokens:s:dass, !tokens:l:Baum{1, 1}, left)}, 0, 1)",
@@ -242,7 +242,7 @@
.getResource(
"/queries/submatch/embedded-negative-repetition.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"subspan(spanExpansion(tokens:s:das, !tokens:l:Baum{1, 3}, right), 1, 1)",
@@ -256,7 +256,7 @@
String filepath = getClass()
.getResource("/queries/submatch/negative-repetition.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{2, 2}, right)}))",
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithAttributeJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithAttributeJSON.java
index fd4ac0a..5353de1 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithAttributeJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithAttributeJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import org.apache.lucene.search.spans.SpanQuery;
@@ -22,7 +22,7 @@
.getResource(
"/queries/attribute/element-single-attribute.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanElementWithAttribute(<tokens:head />, spanAttribute(tokens:type:top))",
@@ -36,7 +36,7 @@
.getResource(
"/queries/attribute/element-single-not-attribute.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanElementWithAttribute(<tokens:head />, spanAttribute(!tokens:type:top))",
@@ -50,7 +50,7 @@
.getResource(
"/queries/attribute/element-multiple-and-not-attributes.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanElementWithAttribute(<tokens:div />, [spanAttribute(tokens:type:Zeitschrift), "
@@ -65,7 +65,7 @@
.getResource(
"/queries/attribute/element-multiple-or-attributes.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanOr([spanElementWithAttribute(<tokens:div />, spanAttribute(tokens:type:Zeitschrift)), "
@@ -81,7 +81,7 @@
.getResource(
"/queries/attribute/any-element-with-attribute.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("spanWithAttribute(spanAttribute(tokens:type:top))",
sq.toString());
@@ -95,7 +95,7 @@
.getResource(
"/queries/attribute/any-element-with-multiple-or-attributes.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanOr([spanWithAttribute(spanAttribute(tokens:type:Zeitschrift)), "
@@ -112,7 +112,7 @@
.getResource(
"/queries/attribute/any-element-with-multiple-and-not-attributes.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals(
"spanWithAttribute([spanAttribute(tokens:type:Zeitschrift), "
@@ -129,7 +129,7 @@
.getResource(
"/queries/attribute/any-element-with-single-not-attribute.jsonld")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
// assertEquals("tokens:???", sq.toString());
}
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQueryJSON.java
index 3b135be..42584b3 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQueryJSON.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query;
-import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
+import static de.ids_mannheim.korap.TestSimple.*;
import static org.junit.Assert.assertEquals;
import org.apache.lucene.search.spans.SpanQuery;
@@ -24,7 +24,7 @@
.getResource(
"/queries/position/token-contain-sentence.json")
.getFile();
- SpanQueryWrapper sqwi = getJSONQuery(filepath);
+ SpanQueryWrapper sqwi = getJsonQuery(filepath);
SpanQuery sq = sqwi.toQuery();
}
}