use of de.ids_mannheim.korap.collection.CollectionBuilder in project Krill by KorAP.
the class TestCollectionBuilder method builderGroups.
@Test
public void builderGroups() throws IOException {
CollectionBuilder kc = new CollectionBuilder();
String g = kc.orGroup().with(kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"))).with(kc.andGroup().with(kc.term("author", "tree2")).with(kc.term("title", "name2"))).toString();
assertEquals("OrGroup(OrGroup(author:tree1 title:name1) AndGroup(author:tree2 title:name2))", g);
}
use of de.ids_mannheim.korap.collection.CollectionBuilder in project Krill by KorAP.
the class TestCollectionBuilder method builderOrNestedSimple.
@Test
public void builderOrNestedSimple() throws IOException {
CollectionBuilder kc = new CollectionBuilder();
assertEquals("OrGroup(author:tree title:name)", kc.orGroup().with(kc.orGroup().with(kc.term("author", "tree")).with(kc.term("title", "name"))).toString());
}
use of de.ids_mannheim.korap.collection.CollectionBuilder in project Krill by KorAP.
the class TestCollectionBuilder method builderDateYear.
@Test
public void builderDateYear() throws IOException {
CollectionBuilder kc = new CollectionBuilder();
assertEquals("pubDate:[20050000 TO 20059999]", kc.date("pubDate", "2005").toString());
}
use of de.ids_mannheim.korap.collection.CollectionBuilder in project Krill by KorAP.
the class TestCollectionBuilder method builderOrCombined.
@Test
public void builderOrCombined() throws IOException {
CollectionBuilder kc = new CollectionBuilder();
assertEquals("OrGroup(author:tree title:name)", kc.orGroup().with(kc.term("author", "tree")).with(kc.term("title", "name")).toString());
}
use of de.ids_mannheim.korap.collection.CollectionBuilder in project Krill by KorAP.
the class TestCollectionBuilder method builderTerm.
@Test
public void builderTerm() throws IOException {
CollectionBuilder kc = new CollectionBuilder();
assertEquals("author:tree", kc.term("author", "tree").toString());
}
Aggregations