cql serialization compilation fixes
diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index c5d1fbd..7e430fa 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -31,7 +31,7 @@
b.append("textClass:wissenschaft");
// CollectionQuery qu = new CollectionQuery().addMetaFilter(b.toString());
CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString());
- System.out.println(query.build());
+ System.out.println(query.buildString());
System.out.println(query.toCollections());
// System.out.println("value reference " + qu.stringify());
// System.out.println();
@@ -41,7 +41,7 @@
public void testSingle() throws IOException {
CollectionQuery query = new CollectionQuery().addMetaFilter("textClass", "wissenschaft");
// System.out.println("------ TEXT SINGLE " + query.stringify());
- System.out.println(query.build());
+ System.out.println(query.buildString());
}
@Test
@@ -53,9 +53,9 @@
b.append(" AND ");
b.append("author:Goethe");
CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString());
- System.out.println("value until/since : " + query.build());
+ System.out.println("value until/since : " + query.buildString());
System.out.println("meta value until/since " + query.toCollections());
- Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Goethe\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"between\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2012-04-01\"},{\"@type\":\"korap:date\",\"@value\":\"2013-04-01\"}]}]}}]", query.build());
+ Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Goethe\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"between\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2012-04-01\"},{\"@type\":\"korap:date\",\"@value\":\"2013-04-01\"}]}]}}]", query.buildString());
// System.out.println();
}
@@ -67,7 +67,7 @@
b.append("author:Hesse");
CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString());
System.out.println("Running date check (until) with additional attribute author");
- Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Hesse\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"until\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.build());
+ Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Hesse\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"until\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.buildString());
// System.out.println("value until : " + query.stringify());
// System.out.println();
}
@@ -79,11 +79,11 @@
b.append(" AND ");
b.append("author:Kafka");
CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString());
- System.out.println("value since : " + query.build());
+ System.out.println("value since : " + query.buildString());
System.out.println("meta value since " + query.toCollections());
// System.out.println();
System.out.println("Running date check (since) with additional attribute author");
- Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Kafka\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"since\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.build());
+ Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Kafka\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"since\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.buildString());
}
@Test
@@ -129,7 +129,7 @@
CollectionQuery q = new CollectionQuery().addMetaFilter(b.toString());
q.addMetaExtend("author", "Hesse");
- System.out.println("--- ALL " + q.build());
+ System.out.println("--- ALL " + q.buildString());
System.out.println();
}
@@ -141,7 +141,7 @@
b.append(" AND ");
b.append("author:Kafka");
CollectionQuery q = new CollectionQuery().addMetaExtend(b.toString());
- System.out.println("array repres " + q.build());
+ System.out.println("array repres " + q.buildString());
System.out.println();
}
@@ -150,7 +150,7 @@
CollectionQuery q = new CollectionQuery().addMetaFilter("corpusID", "A00");
q.addMetaExtend("corpusID", "A01");
- System.out.println("results stringified " + q.build());
+ System.out.println("results stringified " + q.buildString());
System.out.println("results to meta" + q.toCollections());
System.out.println();
}
@@ -172,7 +172,7 @@
@Test
public void testA00() throws IOException {
CollectionQuery q = new CollectionQuery().addMetaExtend("corpusID", "A00").addMetaExtend("corpusID", "A01");
- System.out.println("A meta: " + q.build());
+ System.out.println("A meta: " + q.buildString());
System.out.println();
}
@@ -181,7 +181,7 @@
String meta = "[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:term\",\"@field\":\"korap:field#corpusID\",\"@value\":\"WPD\"}}]";
CollectionQuery q = new CollectionQuery().addResource(meta);
q.addMetaFilter("textClass", "wissenschaft");
- System.out.println("stringified meta " + q.build());
+ System.out.println("stringified meta " + q.buildString());
System.out.println("meta string " + q.toCollections());
}