use of de.ids_mannheim.korap.util.QueryException 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;
}
use of de.ids_mannheim.korap.util.QueryException in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqNegativelastConstraint.
@Test
public void queryJSONseqNegativelastConstraint() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-last-constraint.jsonld");
try {
sqwi.toQuery().toString();
fail("Should throw an exception");
} catch (QueryException qe) {
assertEquals("Distance constraints not supported with empty, optional or negative operands", qe.getMessage());
}
;
}
Aggregations