Renamed KorapCollection to KrillCollection
diff --git a/Changes b/Changes
index 0a7df5f..0fee626 100644
--- a/Changes
+++ b/Changes
@@ -6,7 +6,8 @@
 	  renamed KorapIndexer to index/Indexer,
 	  renamed KorapDocument to model/AbstractDocument,
 	  renamed KorapMatch to response/Match,
-	  renamed KorapIndex to KrillIndex (diewald)
+	  renamed KorapIndex to KrillIndex,
+	  renamed KorapCollection to KrillCollection (diewald)
         - [documentation] Improved documentation for API classes (diewald)
 
 0.50 2015-02-23
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index 813bfa5..d3d6588 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.java
@@ -35,7 +35,7 @@
  * @author margaretha
  *
  * @see KrillMeta
- * @see KorapCollection
+ * @see KrillCollection
  * @see KrillQuery
  * @see KrillIndex
  */
@@ -185,13 +185,13 @@
         try {
             if (json.has("collection")) {
                 this.setCollection(
-                    new KorapCollection().fromJson(json.get("collection"))
+                    new KrillCollection().fromJson(json.get("collection"))
                 );
             }
 
             // <legacycode>
             else if (json.has("collections")) {
-                KorapCollection kc = new KorapCollection();
+                KrillCollection kc = new KrillCollection();
                 for (JsonNode collection : json.get("collections")) {
                     kc.fromJsonLegacy(collection);
                 };
diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
similarity index 93%
rename from src/main/java/de/ids_mannheim/korap/KorapCollection.java
rename to src/main/java/de/ids_mannheim/korap/KrillCollection.java
index e7be517..d2781ff 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
@@ -28,16 +28,17 @@
 
 /**
  * Create a Virtual Collection of documents by means of a KoralQuery
- * or by applying manual filters and extensions on Lucene fields.
+ * collection object.
+ * Alternatively by applying manual filters and extensions on Lucene fields.
  *
  * <blockquote><pre>
- *   KorapCollection kc = new KorapCollection(json);
+ *   KrillCollection kc = new KrillCollection(json);
  *   kc.filterUIDS("a1", "a2", "a3");
  * </pre></blockquote>
  *
  * <strong>Warning</strong>: This API is deprecated and will
  * be replaced in future versions. It supports legacy versions of
- * KoralQuery.
+ * KoralQuery that will be disabled.
  *
  * @author diewald
  */
@@ -50,7 +51,7 @@
  * See http://mail-archives.apache.org/mod_mbox/lucene-java-user/
  *     200805.mbox/%3C17080852.post@talk.nabble.com%3E
  */
-public class KorapCollection extends Notifications {
+public class KrillCollection extends Notifications {
     private KrillIndex index;
     private KorapDate created;
     private String id;
@@ -58,31 +59,31 @@
     private int filterCount = 0;
     
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapCollection.class);
+    private final static Logger log = LoggerFactory.getLogger(KrillCollection.class);
 
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
 
 
     /**
-     * Construct a new KorapCollection by passing a KrillIndex.
+     * Construct a new KrillCollection by passing a KrillIndex.
      *
      * @param index The {@link KrillIndex} object.
      */
-    public KorapCollection (KrillIndex index) {
+    public KrillCollection (KrillIndex index) {
         this.index = index;
         this.filter = new ArrayList<FilterOperation>(5);
     };
 
 
     /**
-     * Construct a new KorapCollection by passing a KoralQuery.
+     * Construct a new KrillCollection by passing a KoralQuery.
      * This supports collections with the key "collection" and
      * legacy collections with the key "collections".
      *
      * @param jsonString The virtual collection as a KoralQuery.
      */
-    public KorapCollection (String jsonString) {
+    public KrillCollection (String jsonString) {
         ObjectMapper mapper = new ObjectMapper();
         this.filter = new ArrayList<FilterOperation>(5);
 
@@ -114,7 +115,7 @@
             this.addError(
                 621,
                 "Unable to parse JSON",
-                "KorapCollection",
+                "KrillCollection",
                 e.getLocalizedMessage()
             );
         };
@@ -122,9 +123,9 @@
 
 
     /**
-     * Construct a new KorapCollection.
+     * Construct a new KrillCollection.
      */
-    public KorapCollection () {
+    public KrillCollection () {
         this.filter = new ArrayList<FilterOperation>(5);
     };
 
@@ -135,13 +136,13 @@
      * @param jsonString The "collection" part of a KoralQuery.
      * @throws QueryException
      */
-    public KorapCollection fromJson (String jsonString) throws QueryException {
+    public KrillCollection fromJson (String jsonString) throws QueryException {
         ObjectMapper mapper = new ObjectMapper();
         try {
             this.fromJson((JsonNode) mapper.readTree(jsonString));
         }
         catch (Exception e) {
-            this.addError(621, "Unable to parse JSON", "KorapCollection");
+            this.addError(621, "Unable to parse JSON", "KrillCollection");
         };
 
         return this;
@@ -155,7 +156,7 @@
      *        as a {@link JsonNode} object.
      * @throws QueryException
      */
-    public KorapCollection fromJson (JsonNode json) throws QueryException {
+    public KrillCollection fromJson (JsonNode json) throws QueryException {
         this.filter(this._fromJson(json));
         return this;
     };
@@ -267,13 +268,13 @@
      * @throws QueryException
      */
     @Deprecated
-    public KorapCollection fromJsonLegacy (String jsonString) throws QueryException {
+    public KrillCollection fromJsonLegacy (String jsonString) throws QueryException {
         ObjectMapper mapper = new ObjectMapper();
         try {
             this.fromJsonLegacy((JsonNode) mapper.readValue(jsonString, JsonNode.class));
         }
         catch (Exception e) {
-            this.addError(621, "Unable to parse JSON", "KorapCollection");
+            this.addError(621, "Unable to parse JSON", "KrillCollection");
         };
         return this;
     };
@@ -288,7 +289,7 @@
      * @throws QueryException
      */
     @Deprecated
-    public KorapCollection fromJsonLegacy (JsonNode json) throws QueryException {
+    public KrillCollection fromJsonLegacy (JsonNode json) throws QueryException {
         if (!json.has("@type"))
             throw new QueryException(701, "JSON-LD group has no @type attribute");
 
@@ -429,10 +430,10 @@
      * legacy API and may vanish without warning.
      *
      * @param filter The filter to add to the collection.
-     * @return The {@link KorapCollection} object for chaining.
+     * @return The {@link KrillCollection} object for chaining.
      */
     // TODO: The checks may not be necessary
-    public KorapCollection filter (BooleanFilter filter) {
+    public KrillCollection filter (BooleanFilter filter) {
         if (DEBUG)
             log.trace("Added filter: {}", filter.toString());
         
@@ -464,9 +465,9 @@
      * legacy API and may vanish without warning.
      *
      * @param filter The filter to add to the collection.
-     * @return The {@link KorapCollection} object for chaining.
+     * @return The {@link KrillCollection} object for chaining.
      */
-    public KorapCollection filter (CollectionBuilder filter) {
+    public KrillCollection filter (CollectionBuilder filter) {
         return this.filter(filter.getBooleanFilter());
     };
 
@@ -478,9 +479,9 @@
      * legacy API and may vanish without warning.
      *
      * @param extension The extension to add to the collection.
-     * @return The {@link KorapCollection} object for chaining.
+     * @return The {@link KrillCollection} object for chaining.
      */
-    public KorapCollection extend (BooleanFilter extension) {
+    public KrillCollection extend (BooleanFilter extension) {
         if (DEBUG)
             log.trace("Added extension: {}", extension.toString());
 
@@ -502,9 +503,9 @@
      * legacy API and may vanish without warning.
      *
      * @param extension The extension to add to the collection.
-     * @return The {@link KorapCollection} object for chaining.
+     * @return The {@link KrillCollection} object for chaining.
      */
-    public KorapCollection extend (CollectionBuilder extension) {
+    public KrillCollection extend (CollectionBuilder extension) {
         return this.extend(extension.getBooleanFilter());
     };
 
@@ -516,9 +517,9 @@
      * This filter is not part of the legacy API!
      *
      * @param uids The list of unique document identifier.
-     * @return The {@link KorapCollection} object for chaining.
+     * @return The {@link KrillCollection} object for chaining.
      */
-    public KorapCollection filterUIDs (String ... uids) {
+    public KrillCollection filterUIDs (String ... uids) {
         BooleanFilter filter = new BooleanFilter();
         filter.or("UID", uids);
         if (DEBUG)
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 47eaa30..f698ffb 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -460,15 +460,15 @@
      * e.g. <i>documents</i>, <i>sentences</i> etc.
      *
      * @param collection The scope of the numbering by means of a
-     *        {@link KorapCollection}
+     *        {@link KrillCollection}
      * @param field The field containing the textual data and the
      *        annotations as a string.
      * @param type The type of meta information,
      *        e.g. <i>documents</i> or <i>sentences</i> as a string.
      * @return The number of the occurrences.
-     * @see KorapCollection#numberOf
+     * @see KrillCollection#numberOf
      */
-    public long numberOf (KorapCollection collection,
+    public long numberOf (KrillCollection collection,
                           String field,
                           String type) {
         // Short cut for documents
@@ -532,10 +532,10 @@
      * @param type The type of meta information,
      *        e.g. <i>documents</i> or <i>sentences</i> as a string.
      * @return The number of the occurrences.
-     * @see KorapCollection#numberOf
+     * @see KrillCollection#numberOf
      */
     public long numberOf (String field, String type) {
-        return this.numberOf(new KorapCollection(this), field, type);
+        return this.numberOf(new KrillCollection(this), field, type);
     };
 
 
@@ -547,7 +547,7 @@
      * @param type The type of meta information,
      *        e.g. <i>documents</i> or <i>sentences</i> as a string.
      * @return The number of the occurrences.
-     * @see KorapCollection#numberOf
+     * @see KrillCollection#numberOf
      */
     public long numberOf (String type) {
         return this.numberOf("tokens", type);
@@ -980,7 +980,7 @@
 
     @Deprecated
     public HashMap getTermRelation (String field) throws Exception {
-        return this.getTermRelation(new KorapCollection(this), field);
+        return this.getTermRelation(new KrillCollection(this), field);
     };
 
 
@@ -988,7 +988,7 @@
      * Analyze how terms relate
      */
     @Deprecated
-    public HashMap getTermRelation (KorapCollection kc, String field) throws Exception {
+    public HashMap getTermRelation (KrillCollection kc, String field) throws Exception {
         HashMap<String,Long> map = new HashMap<>(100);
         long docNumber = 0, checkNumber = 0;
         
@@ -1112,7 +1112,7 @@
 
 
     @Deprecated
-    public KorapResult search (KorapCollection collection,
+    public KorapResult search (KrillCollection collection,
                                SpanQuery query,
                                int startIndex,
                                short count,
@@ -1143,7 +1143,7 @@
 
         this.termContexts = new HashMap<Term, TermContext>();
 
-        KorapCollection collection = ks.getCollection();
+        KrillCollection collection = ks.getCollection();
         collection.setIndex(this);
 
         // Get the spanquery from the Krill object
@@ -1387,7 +1387,7 @@
         if (DEBUG)
             log.trace("Start collecting");
 
-        KorapCollection collection = ks.getCollection();
+        KrillCollection collection = ks.getCollection();
         collection.setIndex(this);
 
         // Init term context
diff --git a/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java b/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
index 2388729..b941a19 100644
--- a/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
@@ -12,7 +12,7 @@
 import org.apache.lucene.search.NumericRangeQuery;
 
 import de.ids_mannheim.korap.util.KorapDate;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.util.QueryException;
 
 import org.slf4j.Logger;
@@ -34,7 +34,7 @@
     private String type;
 
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapCollection.class);
+    private final static Logger log = LoggerFactory.getLogger(KrillCollection.class);
 
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
diff --git a/src/main/java/de/ids_mannheim/korap/node/Resource.java b/src/main/java/de/ids_mannheim/korap/node/Resource.java
index b26b06c..9270bbd 100644
--- a/src/main/java/de/ids_mannheim/korap/node/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/node/Resource.java
@@ -23,7 +23,7 @@
 import de.ids_mannheim.korap.KorapNode;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.Krill;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.response.KorapResponse;
@@ -232,7 +232,7 @@
 
                 // Build Collection based on a list of uids
                 List<String> uids = qp.get("uid");
-                KorapCollection kc = new KorapCollection();
+                KrillCollection kc = new KrillCollection();
                 kc.filterUIDs(uids.toArray(new String[uids.size()]));
                 
                 // TODO: RESTRICT COLLECTION TO ONLY RESPECT SELF DOCS (REPLICATION)
diff --git a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
index 88b73bc..dcc18f7 100644
--- a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
+++ b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
@@ -8,7 +8,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillMeta;
 
 
@@ -37,7 +37,7 @@
     ObjectMapper mapper = new ObjectMapper();
 
     private KrillMeta meta;
-    private KorapCollection collection;
+    private KrillCollection collection;
 
     private String version, name, node, listener;
     private KrillQuery query;
@@ -357,26 +357,26 @@
     /**
      * Get the associated collection object.
      * In case no collection information was defined yet,
-     * a new {@link KorapCollection} object will be created.
+     * a new {@link KrillCollection} object will be created.
      *
-     * @return The attached {@link KorapCollection} object.
+     * @return The attached {@link KrillCollection} object.
      */
     @JsonIgnore
-    public KorapCollection getCollection () {
+    public KrillCollection getCollection () {
         if (this.collection == null)
-            this.collection = new KorapCollection();
+            this.collection = new KrillCollection();
         return this.collection;
     };
 
 
     /**
-     * Set a new {@link KorapCollection} object.
+     * Set a new {@link KrillCollection} object.
      *
-     * @param collection A {@link KorapCollection} object.
+     * @param collection A {@link KrillCollection} object.
      * @return The {@link KorapResponse} object for chaining
      */
     @JsonIgnore
-    public KorapResponse setCollection (KorapCollection collection) {
+    public KorapResponse setCollection (KrillCollection collection) {
         this.collection = collection;
         
         // Move messages from the collection
diff --git a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
index 7292a14..0b9730e 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -5,7 +5,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KrillQuery;
@@ -35,7 +35,7 @@
         KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
 
         // Create a container for virtual collections:
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         long t1 = 0, t2 = 0;
         /// cosmas20.json!!!
@@ -86,7 +86,7 @@
         KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
         
         // Create a container for virtual collections:
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         long t1 = 0, t2 = 0;
         /// cosmas20.json!!!
@@ -129,7 +129,7 @@
         KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
 
         // Create a container for virtual collections:
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         long t1 = 0, t2 = 0;
         /// cosmas20.json!!!
@@ -171,7 +171,7 @@
         KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
 
         // Create a container for virtual collections:
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         long t1 = 0, t2 = 0;
         // Without classes
@@ -318,7 +318,7 @@
         KrillIndex ki = new KrillIndex(new MMapDirectory(new File(prop.getProperty("lucene.indexDir"))));
 
         // Create a container for virtual collections:
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         long t1 = 0, t2 = 0;
         /// cosmas20.json!!!
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSON.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
similarity index 81%
rename from src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSON.java
rename to src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
index bee4da5..0e6a806 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
@@ -3,7 +3,7 @@
 import java.util.*;
 import java.io.*;
 
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 
 import static de.ids_mannheim.korap.TestSimple.*;
 
@@ -14,14 +14,14 @@
 import org.junit.runners.JUnit4;
 
 @RunWith(JUnit4.class)
-public class TestKorapCollectionJSON {
+public class TestKrillCollectionJSON {
 
     final String path = "/queries/collections/";
 
     @Test
     public void collection1 () {
         String metaQuery = _getJSONString("collection_1.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(
             kc.toString(),
             "filter with QueryWrapperFilter(+pubDate:20000101); "
@@ -31,7 +31,7 @@
     @Test
     public void collection2 () {
         String metaQuery = _getJSONString("collection_2.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(
             kc.toString(),
             "filter with QueryWrapperFilter(+(+pubDate:"+
@@ -43,7 +43,7 @@
     @Test
     public void collection3 () {
         String metaQuery = _getJSONString("collection_3.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(kc.toString(), "");
     };
 
@@ -51,7 +51,7 @@
     @Test
     public void collection5 () {
         String metaQuery = _getJSONString("collection_5.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(
             kc.toString(),
             "filter with QueryWrapperFilter(+(pubDate:"+
@@ -63,7 +63,7 @@
     @Test
     public void nocollectiontypegiven () {
         String metaQuery = _getJSONString("multiterm_rewrite_collection.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(701, kc.getError(0).getCode());
     };
 
@@ -71,7 +71,7 @@
     @Test
     public void noCollection () {
         String metaQuery = _getJSONString("no_collection.jsonld");
-        KorapCollection kc = new KorapCollection(metaQuery);
+        KrillCollection kc = new KrillCollection(metaQuery);
         assertEquals(
             "filter with QueryWrapperFilter(+corpusID:WPD); ",
             kc.toString()
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSONLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
similarity index 85%
rename from src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSONLegacy.java
rename to src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
index ef9be16..41a0d41 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionJSONLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
@@ -3,7 +3,7 @@
 import java.util.*;
 import java.io.*;
 
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 
 import static de.ids_mannheim.korap.TestSimple.*;
 
@@ -14,12 +14,12 @@
 import org.junit.runners.JUnit4;
 
 @RunWith(JUnit4.class)
-public class TestKorapCollectionJSONLegacy {
+public class TestKrillCollectionJSONLegacy {
 
     @Test
     public void metaQuery1 () {
 	String metaQuery = getString(getClass().getResource("/queries/metaquery.jsonld").getFile());
-	KorapCollection kc = new KorapCollection(metaQuery);
+	KrillCollection kc = new KrillCollection(metaQuery);
 
 	assertEquals("filter with QueryWrapperFilter(+textClass:wissenschaft)", kc.getFilter(0).toString());
 	assertEquals("filter with QueryWrapperFilter(+(+pubPlace:Erfurt +author:Hesse))", kc.getFilter(1).toString());
@@ -31,7 +31,7 @@
     @Test
     public void metaQuery2 () {
 	String metaQuery = getString(getClass().getResource("/queries/metaquery2.jsonld").getFile());
-	KorapCollection kc = new KorapCollection(metaQuery);
+	KrillCollection kc = new KrillCollection(metaQuery);
 	assertEquals(1,kc.getCount());
 	assertEquals("filter with QueryWrapperFilter(+(+author:Hesse +pubDate:[0 TO 20131205]))",kc.getFilter(0).toString());
     };
@@ -39,7 +39,7 @@
     @Test
     public void metaQuery3 () {
 	String metaQuery = getString(getClass().getResource("/queries/metaquery4.jsonld").getFile());
-	KorapCollection kc = new KorapCollection(metaQuery);
+	KrillCollection kc = new KrillCollection(metaQuery);
 	assertEquals(1,kc.getCount());
 	assertEquals("filter with QueryWrapperFilter(+pubDate:[20000101 TO 20131231])",kc.getFilter(0).toString());
     };
@@ -47,7 +47,7 @@
     @Test
     public void metaQuery7 () {
 	String metaQuery = getString(getClass().getResource("/queries/metaquery7.jsonld").getFile());
-	KorapCollection kc = new KorapCollection(metaQuery);
+	KrillCollection kc = new KrillCollection(metaQuery);
 	assertEquals(2,kc.getCount());
 	assertEquals("filter with QueryWrapperFilter(+(corpusID:c-1 corpusID:c-2))",kc.getFilter(0).toString());
 	assertEquals("filter with QueryWrapperFilter(+(+corpusID:d-1 +corpusID:d-2))",kc.getFilter(1).toString());
@@ -56,7 +56,7 @@
     @Test
     public void metaQuery9 () {
 	String metaQuery = getString(getClass().getResource("/queries/metaquery9.jsonld").getFile());
-	KorapCollection kc = new KorapCollection(metaQuery);
+	KrillCollection kc = new KrillCollection(metaQuery);
 	assertEquals(1,kc.getCount());
 	assertEquals("filter with QueryWrapperFilter(+corpusID:WPD)",kc.getFilter(0).toString());
     };
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
similarity index 96%
rename from src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
rename to src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
index f890f1f..d6b673c 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
@@ -4,7 +4,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.query.QueryBuilder;
@@ -22,7 +22,7 @@
 import org.junit.runners.JUnit4;
 
 @RunWith(JUnit4.class)
-public class TestKorapCollectionLegacy {
+public class TestKrillCollectionLegacy {
 
     @Test
     public void filterExample () throws Exception {
@@ -46,7 +46,7 @@
 	CollectionBuilder kf = new CollectionBuilder();
 
 	// Create Virtual collections:
-	KorapCollection kc = new KorapCollection(ki);
+	KrillCollection kc = new KrillCollection(ki);
 
 	assertEquals("Documents", 7, kc.numberOf("documents"));
 
@@ -121,7 +121,7 @@
 	CollectionBuilder kf = new CollectionBuilder();
 
 	// Create Virtual collections:
-	KorapCollection kc = new KorapCollection(ki);
+	KrillCollection kc = new KrillCollection(ki);
 
 	assertEquals("Documents", 7, kc.numberOf("documents"));
 
@@ -201,7 +201,7 @@
 	CollectionBuilder kf = new CollectionBuilder();
 
 	// Create Virtual collections:
-	KorapCollection kc = new KorapCollection(ki);
+	KrillCollection kc = new KrillCollection(ki);
 	kc.filter( kf.and("textClass", "reisen").and("textClass", "freizeit-unterhaltung") );
 	assertEquals("Documents", 5, kc.numberOf("documents"));
 	assertEquals("Tokens", 1678, kc.numberOf("tokens"));
@@ -257,7 +257,7 @@
         assertEquals(86,kr.getTotalResults());
 
 	// Create Virtual collections:
-	KorapCollection kc = new KorapCollection();
+	KrillCollection kc = new KrillCollection();
 	kc.filterUIDs(new String[]{"2", "3", "4"});
 	kc.setIndex(ki);
 	assertEquals("Documents", 3, kc.numberOf("documents"));
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
index acfb9f5..3f0bd6d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
@@ -17,7 +17,7 @@
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.index.MatchCollector;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanClassQuery;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
index 31186b4..a44a493 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -16,7 +16,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.query.*;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -470,7 +470,7 @@
 
         SpanQuery sq;
         KorapResult kr;
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         assertEquals("Documents", 4, kc.numberOf("documents"));
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
index 0c742ce..cf7dda2 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
@@ -13,7 +13,7 @@
 import org.apache.lucene.store.MMapDirectory;
 import org.junit.Test;
 
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.KorapResult;
@@ -161,7 +161,7 @@
 		// Check if it includes some results
 		BooleanFilter bf = new BooleanFilter();
 		bf.or("ID", "WPD_BBB.04463", "WPD_III.00758");
-		KorapCollection kc = new KorapCollection();	
+		KrillCollection kc = new KrillCollection();	
 		kc.filter(bf);
 		ks.setCollection(kc);
 		kr = ks.apply(ki);		
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
index 67c67f4..7707ebf 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -7,7 +7,7 @@
 
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillMeta;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.query.QueryBuilder;
@@ -205,7 +205,7 @@
 
         ks = new Krill(json);
         // Ignore the collection part of the query!
-        ks.setCollection(new KorapCollection());
+        ks.setCollection(new KrillCollection());
         kr = ks.apply(ki);
 
         assertEquals(kr.getTotalResults(), 5);
@@ -413,7 +413,7 @@
         json = getString(
             getClass().getResource("/queries/metaquery9.jsonld").getFile()
         );
-        KorapCollection kc = new KorapCollection(json);
+        KrillCollection kc = new KrillCollection(json);
         kc.setIndex(ki);
         assertEquals(7, kc.numberOf("documents"));
     };
@@ -536,7 +536,7 @@
         Krill ks = new Krill(json);
         ks.getMeta().setItemsPerResource(1);
 
-        KorapCollection kc = new KorapCollection();
+        KrillCollection kc = new KrillCollection();
         kc.filterUIDs(new String[]{"1", "4"});
         kc.setIndex(ki);
         ks.setCollection(kc);
@@ -927,7 +927,7 @@
         );
 	
         Krill ks = new Krill(json);
-        KorapCollection kc = ks.getCollection();
+        KrillCollection kc = ks.getCollection();
 
         // No index was set
         assertEquals(-1, kc.numberOf("documents"));
@@ -1303,7 +1303,7 @@
         };
         ki.commit();
 
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
 
         assertEquals(7, kc.numberOf("documents"));
 
@@ -1359,7 +1359,7 @@
         );
         ki.commit();
 
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
         assertEquals(3, kc.numberOf("documents"));
 
     	HashMap map = kc.getTermRelation("textClass");
@@ -1437,7 +1437,7 @@
         );
         ki.commit();
 
-        KorapCollection kc = new KorapCollection(ki);
+        KrillCollection kc = new KrillCollection(ki);
         assertEquals(4, kc.numberOf("documents"));
 
     	HashMap map = kc.getTermRelation("textClass");
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
index c6bc671..f1ec5c4 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
@@ -6,7 +6,7 @@
 import static de.ids_mannheim.korap.TestSimple.*;
 
 import de.ids_mannheim.korap.Krill;
-import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;