KorAP-querySerialization independent from
- KorAP-PoliqarpParser
- KorAP-AnnisParser
- KorAP-Cosmas2Parser
- KorAP-lucene-index
grammars integrated into querySerialization
still depends on KorAP-Entities (e.g. JsonUtils used in QuerySerializer and CollectionQueryBuilder)
diff --git a/src/test/java/AqlTreeTest.java b/src/test/java/AqlTreeTest.java
index a65d2b1..77d9ec5 100644
--- a/src/test/java/AqlTreeTest.java
+++ b/src/test/java/AqlTreeTest.java
@@ -10,7 +10,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.serialize.util.QueryException;
/**
* Tests for JSON-LD serialization of ANNIS QL queries.
diff --git a/src/test/java/CQLTest.java b/src/test/java/CQLTest.java
index 0018103..abe8703 100644
--- a/src/test/java/CQLTest.java
+++ b/src/test/java/CQLTest.java
@@ -10,7 +10,7 @@
import de.ids_mannheim.korap.query.serialize.CQLTree;
import de.ids_mannheim.korap.query.serialize.CosmasTree;
-import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.serialize.util.QueryException;
public class CQLTest {
diff --git a/src/test/java/CollectionQueryTreeTest.java b/src/test/java/CollectionQueryTreeTest.java
index ee7b554..a2be38b 100644
--- a/src/test/java/CollectionQueryTreeTest.java
+++ b/src/test/java/CollectionQueryTreeTest.java
@@ -4,7 +4,7 @@
import java.util.ArrayList;
import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.serialize.util.QueryException;
import org.junit.Test;
@@ -108,7 +108,7 @@
assertEquals("2014", res.at("/collection/operands/1/value").asText());
assertEquals(true, res.at("/collection/operands/1/type").isMissingNode());
assertEquals("match:eq", res.at("/collection/operands/1/match").asText());
- assertEquals("", res.at("/warnings/0/"));
+ assertTrue(res.at("/warnings/0/0").asText().startsWith("The collection query contains a value that looks like a date"));
}
@Test
diff --git a/src/test/java/CosmasTreeTest.java b/src/test/java/CosmasTreeTest.java
index 03ab986..62a663a 100644
--- a/src/test/java/CosmasTreeTest.java
+++ b/src/test/java/CosmasTreeTest.java
@@ -6,7 +6,7 @@
import org.junit.Test;
import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.serialize.util.QueryException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index 93cca72..acde5a6 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -98,39 +98,39 @@
System.out.println("THE RESULTING QUERY: " + s.toJSON());
}
- // @Test
- public void testGenerator() throws QueryException {
- /*
- * just for testing...
- */
- QuerySerializer jg = new QuerySerializer();
- int i = 0;
- String[] queries;
- queries = new String[]{
- "shrink({[base=foo]})",
- "shrink({[base=foo]}[orth=bar])",
- "shrink(1:[base=Der]{1:[base=Mann]})",
- };
-
- for (String q : queries) {
- i++;
- try {
- System.out.println(q);
- jg.run(q, "poliqarp", System.getProperty("user.home") + "/bsp" + i + ".json");
- System.out.println();
- } catch (NullPointerException npe) {
- npe.printStackTrace();
- System.out.println("null\n");
- System.out.println();
- } catch (JsonGenerationException e) {
- e.printStackTrace();
- } catch (JsonMappingException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
+// // @Test
+// public void testGenerator() throws QueryException {
+// /*
+// * just for testing...
+// */
+// QuerySerializer jg = new QuerySerializer();
+// int i = 0;
+// String[] queries;
+// queries = new String[]{
+// "shrink({[base=foo]})",
+// "shrink({[base=foo]}[orth=bar])",
+// "shrink(1:[base=Der]{1:[base=Mann]})",
+// };
+//
+// for (String q : queries) {
+// i++;
+// try {
+// System.out.println(q);
+// jg.run(q, "poliqarp", System.getProperty("user.home") + "/bsp" + i + ".json");
+// System.out.println();
+// } catch (NullPointerException npe) {
+// npe.printStackTrace();
+// System.out.println("null\n");
+// System.out.println();
+// } catch (JsonGenerationException e) {
+// e.printStackTrace();
+// } catch (JsonMappingException e) {
+// e.printStackTrace();
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+// }
+// }
@Test
public void testLists() {
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 3dc2429..06ac536 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -12,7 +12,7 @@
import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.serialize.util.QueryException;
/**
* Tests for JSON-LD serialization of PoliqarpPlus queries.