commit | d0618717a17709f13bfdfcb0e899b48ca9194584 | [log] [tgz] |
---|---|---|
author | Michael Hanl <micha.hanl@gmail.com> | Fri Aug 01 15:23:25 2014 +0000 |
committer | Michael Hanl <micha.hanl@gmail.com> | Fri Aug 01 15:23:25 2014 +0000 |
tree | f549e4656108bcbc14e70e3be67c7cfb7ed887cf | |
parent | 687e4d45462e34c976225e973e4462568f68e942 [diff] |
tests
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java index 6e86dc4..0aac8d6 100644 --- a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java +++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
@@ -164,6 +164,14 @@ return this; } + public QuerySerializer setMeta(String context, int num, int pageidx) { + MetaQueryBuilder meta = new MetaQueryBuilder(); + meta.addEntry("startIndex", pageidx); + meta.addEntry("count", num); + meta.addContext(context); + return this; + } + public QuerySerializer setMeta(MetaQueryBuilder meta) { this.meta = meta.raw(); return this;
diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java index 50b65ca..d3caaad 100644 --- a/src/test/java/MetaQuerySerializationTest.java +++ b/src/test/java/MetaQuerySerializationTest.java
@@ -87,7 +87,7 @@ @Test public void testGenerator() throws QueryException { - /* + /* * just for testing... */ QuerySerializer jg = new QuerySerializer();