use of de.ids_mannheim.korap.KrillQuery in project Krill by KorAP.
the class TestKrillQueryJSON method queryJSONmerge.
@Test
public void queryJSONmerge() throws QueryException {
// treat merging gracefully
String json = getString(getClass().getResource("/queries/merge.jsonld").getFile());
KrillQuery kq = new KrillQuery("tokens");
assertEquals(kq.fromKoral(json).toQuery().toString(), "spanNext(tokens:s:der, tokens:s:Baum)");
assertEquals(kq.getWarning(0).getCode(), 774);
}
use of de.ids_mannheim.korap.KrillQuery in project Krill by KorAP.
the class TestKrillQueryJSON method jsonQuery.
public static SpanQueryWrapper jsonQuery(String jsonFile) {
SpanQueryWrapper sqwi;
try {
String json = getString(jsonFile);
sqwi = new KrillQuery("tokens").fromKoral(json);
} catch (QueryException e) {
fail(e.getMessage());
sqwi = new QueryBuilder("tokens").seg("???");
}
;
return sqwi;
}
Aggregations