Renamed all utility classes
diff --git a/Changes b/Changes
index 6f3bcf4..f976dc9 100644
--- a/Changes
+++ b/Changes
@@ -8,7 +8,11 @@
renamed KorapMatch to response/Match,
renamed KorapIndex to KrillIndex,
renamed KorapCollection to KrillCollection,
- move collector classes from index to response (diewald)
+ move collector classes from index to response,
+ renamed KorapDate to KrillDate,
+ renamed KorapArray to KrillArray,
+ renamed KorapByte to KrillByte,
+ renamed KorapString to KrillString (diewald)
- [documentation] Improved documentation for API classes (diewald)
0.50 2015-02-23
diff --git a/src/main/java/de/ids_mannheim/korap/KrillCollection.java b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
index d2781ff..d44693e 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
@@ -4,7 +4,7 @@
import java.io.IOException;
import de.ids_mannheim.korap.*;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import de.ids_mannheim.korap.util.QueryException;
import de.ids_mannheim.korap.collection.BooleanFilter;
import de.ids_mannheim.korap.collection.FilterOperation;
@@ -53,7 +53,7 @@
*/
public class KrillCollection extends Notifications {
private KrillIndex index;
- private KorapDate created;
+ private KrillDate created;
private String id;
private ArrayList<FilterOperation> filter;
private int filterCount = 0;
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 b941a19..7393a01 100644
--- a/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
@@ -11,7 +11,7 @@
import org.apache.lucene.search.RegexpQuery;
import org.apache.lucene.search.NumericRangeQuery;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import de.ids_mannheim.korap.KrillCollection;
import de.ids_mannheim.korap.util.QueryException;
@@ -120,16 +120,16 @@
};
public BooleanFilter since (String dateStr) {
- int since = new KorapDate(dateStr).floor();
+ int since = new KrillDate(dateStr).floor();
- if (since == 0 || since == KorapDate.BEGINNING)
+ if (since == 0 || since == KrillDate.BEGINNING)
return this;
bool.add(
NumericRangeQuery.newIntRange(
"pubDate",
since,
- KorapDate.END,
+ KrillDate.END,
true,
true
),
@@ -142,14 +142,14 @@
public BooleanFilter till (String dateStr) {
try {
- int till = new KorapDate(dateStr).ceil();
- if (till == 0 || till == KorapDate.END)
+ int till = new KrillDate(dateStr).ceil();
+ if (till == 0 || till == KrillDate.END)
return this;
bool.add(
NumericRangeQuery.newIntRange(
"pubDate",
- KorapDate.BEGINNING,
+ KrillDate.BEGINNING,
till,
true,
true
@@ -165,16 +165,16 @@
public BooleanFilter between (String beginStr, String endStr) {
- KorapDate beginDF = new KorapDate(beginStr);
+ KrillDate beginDF = new KrillDate(beginStr);
int begin = beginDF.floor();
- int end = new KorapDate(endStr).ceil();
+ int end = new KrillDate(endStr).ceil();
if (end == 0)
return this;
- if (begin == KorapDate.BEGINNING && end == KorapDate.END)
+ if (begin == KrillDate.BEGINNING && end == KrillDate.END)
return this;
if (begin == end) {
@@ -197,7 +197,7 @@
public BooleanFilter date (String dateStr) {
- KorapDate dateDF = new KorapDate(dateStr);
+ KrillDate dateDF = new KrillDate(dateStr);
if (dateDF.year == 0)
return this;
@@ -206,7 +206,7 @@
int begin = dateDF.floor();
int end = dateDF.ceil();
- if (end == 0 || (begin == KorapDate.BEGINNING && end == KorapDate.END))
+ if (end == 0 || (begin == KrillDate.BEGINNING && end == KrillDate.END))
return this;
this.bool.add(
diff --git a/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java b/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
index 3677ff0..bc5158c 100644
--- a/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
@@ -3,7 +3,7 @@
import de.ids_mannheim.korap.collection.BooleanFilter;
import de.ids_mannheim.korap.collection.RegexFilter;
import de.ids_mannheim.korap.util.QueryException;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import org.apache.lucene.search.Query;
diff --git a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
index 16c5777..ce38fdb 100644
--- a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
@@ -3,7 +3,7 @@
import de.ids_mannheim.korap.model.MultiTermTokenStream;
import de.ids_mannheim.korap.model.MultiTermToken;
import de.ids_mannheim.korap.model.AbstractDocument;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import de.ids_mannheim.korap.util.CorpusDataException;
import com.fasterxml.jackson.annotation.*;
@@ -251,16 +251,16 @@
@JsonProperty("pubDate")
@Override
- public KorapDate setPubDate (String pubDate) {
- KorapDate date = super.setPubDate(pubDate);
+ public KrillDate setPubDate (String pubDate) {
+ KrillDate date = super.setPubDate(pubDate);
this.addInt("pubDate", date.toString());
return date;
};
@JsonProperty("creationDate")
@Override
- public KorapDate setCreationDate (String creationDate) {
- KorapDate date = super.setCreationDate(creationDate);
+ public KrillDate setCreationDate (String creationDate) {
+ KrillDate date = super.setCreationDate(creationDate);
this.addInt("creationDate", date.toString());
return date;
};
diff --git a/src/main/java/de/ids_mannheim/korap/model/AbstractDocument.java b/src/main/java/de/ids_mannheim/korap/model/AbstractDocument.java
index 9bd92db..7dd9bf3 100644
--- a/src/main/java/de/ids_mannheim/korap/model/AbstractDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/model/AbstractDocument.java
@@ -2,7 +2,7 @@
import java.util.*;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import de.ids_mannheim.korap.index.FieldDocument;
import de.ids_mannheim.korap.response.KorapResponse;
@@ -34,7 +34,7 @@
localDocID,
UID;
- private KorapDate
+ private KrillDate
pubDate,
// newly added
creationDate;
@@ -74,12 +74,12 @@
/**
* Get the publication date of the document
- * as a {@link KorapDate} object.
+ * as a {@link KrillDate} object.
*
- * @return A {@link KorapDate} object for chaining.
+ * @return A {@link KrillDate} object for chaining.
*/
@JsonIgnore
- public KorapDate getPubDate () {
+ public KrillDate getPubDate () {
return this.pubDate;
};
@@ -88,7 +88,7 @@
* Get the publication date of the document
* as a string.
*
- * @return A string containing the {@link KorapDate}.
+ * @return A string containing the {@link KrillDate}.
*/
@JsonProperty("pubDate")
public String getPubDateString () {
@@ -101,12 +101,12 @@
/**
* Set the publication date of the document.
*
- * @param date The date as a {@link KorapDate}
+ * @param date The date as a {@link KrillDate}
* compatible string representation.
- * @return A {@link KorapDate} object for chaining.
+ * @return A {@link KrillDate} object for chaining.
*/
- public KorapDate setPubDate (String date) {
- this.pubDate = new KorapDate(date);
+ public KrillDate setPubDate (String date) {
+ this.pubDate = new KrillDate(date);
return this.pubDate;
};
@@ -114,22 +114,22 @@
/**
* Set the publication date of the document.
*
- * @param date The date as a {@link KorapDate} object.
- * @return A {@link KorapDate} object for chaining.
+ * @param date The date as a {@link KrillDate} object.
+ * @return A {@link KrillDate} object for chaining.
*/
- public KorapDate setPubDate (KorapDate date) {
+ public KrillDate setPubDate (KrillDate date) {
return (this.pubDate = date);
};
/**
* Get the creation date of the document
- * as a {@link KorapDate} object.
+ * as a {@link KrillDate} object.
*
- * @return A {@link KorapDate} object for chaining.
+ * @return A {@link KrillDate} object for chaining.
*/
@JsonIgnore
- public KorapDate getCreationDate () {
+ public KrillDate getCreationDate () {
return this.creationDate;
};
@@ -138,7 +138,7 @@
* Get the creation date of the document
* as a string.
*
- * @return A string containing the {@link KorapDate}.
+ * @return A string containing the {@link KrillDate}.
*/
@JsonProperty("creationDate")
public String getCreationDateString () {
@@ -151,12 +151,12 @@
/**
* Set the creation date of the document.
*
- * @param date The date as a {@link KorapDate}
+ * @param date The date as a {@link KrillDate}
* compatible string representation.
- * @return A {@link KorapDate} object for chaining.
+ * @return A {@link KrillDate} object for chaining.
*/
- public KorapDate setCreationDate (String date) {
- this.creationDate = new KorapDate(date);
+ public KrillDate setCreationDate (String date) {
+ this.creationDate = new KrillDate(date);
return this.creationDate;
};
@@ -164,10 +164,10 @@
/**
* Set the creation date of the document.
*
- * @param date The date as a {@link KorapDate} object.
- * @return A {@link KorapDate} object for chaining.
+ * @param date The date as a {@link KrillDate} object.
+ * @return A {@link KrillDate} object for chaining.
*/
- public KorapDate setCreationDate (KorapDate date) {
+ public KrillDate setCreationDate (KrillDate date) {
return (this.creationDate = date);
};
diff --git a/src/main/java/de/ids_mannheim/korap/model/MultiTerm.java b/src/main/java/de/ids_mannheim/korap/model/MultiTerm.java
index 007f9f1..c710419 100644
--- a/src/main/java/de/ids_mannheim/korap/model/MultiTerm.java
+++ b/src/main/java/de/ids_mannheim/korap/model/MultiTerm.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.model;
-import static de.ids_mannheim.korap.util.KorapArray.*;
+import static de.ids_mannheim.korap.util.KrillArray.*;
import de.ids_mannheim.korap.util.CorpusDataException;
import org.apache.lucene.util.BytesRef;
import java.nio.ByteBuffer;
diff --git a/src/main/java/de/ids_mannheim/korap/model/MultiTermTokenStream.java b/src/main/java/de/ids_mannheim/korap/model/MultiTermTokenStream.java
index bcc3512..2ca5242 100644
--- a/src/main/java/de/ids_mannheim/korap/model/MultiTermTokenStream.java
+++ b/src/main/java/de/ids_mannheim/korap/model/MultiTermTokenStream.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.model;
-import static de.ids_mannheim.korap.util.KorapByte.*;
+import static de.ids_mannheim.korap.util.KrillByte.*;
import de.ids_mannheim.korap.util.CorpusDataException;
import org.apache.lucene.util.BytesRef;
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
index f38f102..8c779db 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
@@ -1,6 +1,6 @@
package de.ids_mannheim.korap.query.spans;
-import static de.ids_mannheim.korap.util.KorapByte.*;
+import static de.ids_mannheim.korap.util.KrillByte.*;
import org.apache.lucene.search.spans.Spans;
import org.apache.lucene.search.spans.SpanQuery;
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
index ab67ed5..8eee7f0 100644
--- a/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
@@ -3,7 +3,7 @@
import org.apache.lucene.util.FixedBitSet;
import de.ids_mannheim.korap.response.Match;
import de.ids_mannheim.korap.response.match.Relation;
-import static de.ids_mannheim.korap.util.KorapString.*;
+import static de.ids_mannheim.korap.util.KrillString.*;
import java.util.*;
import java.io.*;
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapArray.java b/src/main/java/de/ids_mannheim/korap/util/KrillArray.java
similarity index 97%
rename from src/main/java/de/ids_mannheim/korap/util/KorapArray.java
rename to src/main/java/de/ids_mannheim/korap/util/KrillArray.java
index bc43d54..210df78 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapArray.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillArray.java
@@ -8,7 +8,7 @@
*
* @author diewald
*/
-public class KorapArray {
+public class KrillArray {
/**
* Join a sequence of strings to a single string.
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapByte.java b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
similarity index 98%
rename from src/main/java/de/ids_mannheim/korap/util/KorapByte.java
rename to src/main/java/de/ids_mannheim/korap/util/KrillByte.java
index 00e605b..8dd6b16 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapByte.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
@@ -8,7 +8,7 @@
*
* @author diewald
*/
-public class KorapByte {
+public class KrillByte {
/**
* Convert an integer to a byte array.
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapDate.java b/src/main/java/de/ids_mannheim/korap/util/KrillDate.java
similarity index 92%
rename from src/main/java/de/ids_mannheim/korap/util/KorapDate.java
rename to src/main/java/de/ids_mannheim/korap/util/KrillDate.java
index f17d4f1..e5f7c99 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapDate.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillDate.java
@@ -4,7 +4,7 @@
import java.util.regex.*;
/**
- * KorapDate implements a helper object to stringify
+ * KrillDate implements a helper object to stringify
* and parse date strings optimized
* for integer range queries in Lucene.
* No support for b.c. dates.
@@ -15,18 +15,18 @@
* {@link http://www.w3.org/TR/NOTE-datetime W3-DateTimes}.
*
* <blockquote><pre>
- * KorapDate kd = new KorapDate("2005-06-03");
+ * KrillDate kd = new KrillDate("2005-06-03");
* System.err.println(kd.day());
* // 3
- * kd = new KorapDate("2005-06");
+ * kd = new KrillDate("2005-06");
* System.err.println(kd.month());
* // 6
* </pre></blockquote>
*
* @author diewald
*/
-public class KorapDate {
+public class KrillDate {
/**
* The year of the date.
@@ -66,17 +66,17 @@
/**
- * Construct a new KorapDate object.
+ * Construct a new KrillDate object.
*/
- public KorapDate () { };
+ public KrillDate () { };
/**
- * Construct a new KorapDate object.
+ * Construct a new KrillDate object.
*
* @param date The date as a string (see synopsis).
*/
- public KorapDate (String date) {
+ public KrillDate (String date) {
if (date == null || date.isEmpty())
return;
@@ -97,7 +97,7 @@
* undefined date segments.
*
* <blockquote><pre>
- * KorapDate kd = new KorapDate("2005-06");
+ * KrillDate kd = new KrillDate("2005-06");
* System.err.println(kd.ceil());
* // 20050699
* </pre></blockquote>
@@ -117,7 +117,7 @@
* undefined date segments.
*
* <blockquote><pre>
- * KorapDate kd = new KorapDate("2005-06");
+ * KrillDate kd = new KrillDate("2005-06");
* System.err.println(kd.floor());
* // 20050600
* </pre></blockquote>
diff --git a/src/main/java/de/ids_mannheim/korap/util/KorapString.java b/src/main/java/de/ids_mannheim/korap/util/KrillString.java
similarity index 98%
rename from src/main/java/de/ids_mannheim/korap/util/KorapString.java
rename to src/main/java/de/ids_mannheim/korap/util/KrillString.java
index a775dea..07af4d6 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KorapString.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillString.java
@@ -12,7 +12,7 @@
*
* @author diewald
*/
-public class KorapString {
+public class KrillString {
/**
* Get String from file.
diff --git a/src/test/java/de/ids_mannheim/korap/TestSimple.java b/src/test/java/de/ids_mannheim/korap/TestSimple.java
index 5d33d4e..6aa26ab 100644
--- a/src/test/java/de/ids_mannheim/korap/TestSimple.java
+++ b/src/test/java/de/ids_mannheim/korap/TestSimple.java
@@ -12,7 +12,7 @@
import de.ids_mannheim.korap.util.QueryException;
import de.ids_mannheim.korap.util.CorpusDataException;
-import static de.ids_mannheim.korap.util.KorapByte.*;
+import static de.ids_mannheim.korap.util.KrillByte.*;
import org.apache.lucene.index.*;
import org.apache.lucene.document.*;
diff --git a/src/test/java/de/ids_mannheim/korap/node/TestResource.java b/src/test/java/de/ids_mannheim/korap/node/TestResource.java
index 5c80b59..3b2db54 100644
--- a/src/test/java/de/ids_mannheim/korap/node/TestResource.java
+++ b/src/test/java/de/ids_mannheim/korap/node/TestResource.java
@@ -22,7 +22,7 @@
import de.ids_mannheim.korap.KorapNode;
import de.ids_mannheim.korap.KorapResult;
import de.ids_mannheim.korap.response.KorapResponse;
-import static de.ids_mannheim.korap.util.KorapString.*;
+import static de.ids_mannheim.korap.util.KrillString.*;
/**
diff --git a/src/test/java/de/ids_mannheim/korap/util/TestKorapArray.java b/src/test/java/de/ids_mannheim/korap/util/TestKrillArray.java
similarity index 89%
rename from src/test/java/de/ids_mannheim/korap/util/TestKorapArray.java
rename to src/test/java/de/ids_mannheim/korap/util/TestKrillArray.java
index 5763a5d..b42774b 100644
--- a/src/test/java/de/ids_mannheim/korap/util/TestKorapArray.java
+++ b/src/test/java/de/ids_mannheim/korap/util/TestKrillArray.java
@@ -1,7 +1,7 @@
package de.ids_mannheim.korap.util;
import java.util.*;
-import static de.ids_mannheim.korap.util.KorapArray.*;
+import static de.ids_mannheim.korap.util.KrillArray.*;
import static org.junit.Assert.*;
import org.junit.Test;
@@ -13,7 +13,7 @@
* @author diewald
*/
@RunWith(JUnit4.class)
-public class TestKorapArray {
+public class TestKrillArray {
@Test
public void StringJoin1 () {
diff --git a/src/test/java/de/ids_mannheim/korap/util/TestKorapByte.java b/src/test/java/de/ids_mannheim/korap/util/TestKrillByte.java
similarity index 92%
rename from src/test/java/de/ids_mannheim/korap/util/TestKorapByte.java
rename to src/test/java/de/ids_mannheim/korap/util/TestKrillByte.java
index 598496b..5cff981 100644
--- a/src/test/java/de/ids_mannheim/korap/util/TestKorapByte.java
+++ b/src/test/java/de/ids_mannheim/korap/util/TestKrillByte.java
@@ -3,14 +3,14 @@
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import static de.ids_mannheim.korap.util.KorapByte.*;
+import static de.ids_mannheim.korap.util.KrillByte.*;
import de.ids_mannheim.korap.util.QueryException;
import java.nio.ByteBuffer;
/**
* @author diewald
*/
-public class TestKorapByte {
+public class TestKrillByte {
@Test
public void testConversion() {
diff --git a/src/test/java/de/ids_mannheim/korap/util/TestKorapDate.java b/src/test/java/de/ids_mannheim/korap/util/TestKrillDate.java
similarity index 79%
rename from src/test/java/de/ids_mannheim/korap/util/TestKorapDate.java
rename to src/test/java/de/ids_mannheim/korap/util/TestKrillDate.java
index 5407e9f..b62e231 100644
--- a/src/test/java/de/ids_mannheim/korap/util/TestKorapDate.java
+++ b/src/test/java/de/ids_mannheim/korap/util/TestKrillDate.java
@@ -3,42 +3,42 @@
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import de.ids_mannheim.korap.util.KorapDate;
+import de.ids_mannheim.korap.util.KrillDate;
import de.ids_mannheim.korap.util.QueryException;
/**
* @author diewald
*/
-public class TestKorapDate {
+public class TestKrillDate {
@Test
public void testByString() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
- kd = new KorapDate("hui");
+ kd = new KrillDate("hui");
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
- kd = new KorapDate("9999-99-99");
+ kd = new KrillDate("9999-99-99");
assertEquals(9999, kd.year);
assertEquals(99, kd.month);
assertEquals(99, kd.day);
@@ -47,25 +47,25 @@
@Test
public void testWithCeil() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals(20050603, kd.ceil());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals(20050699, kd.ceil());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals(20059999, kd.ceil());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
@@ -74,25 +74,25 @@
@Test
public void testWithFloor() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals(20050603, kd.floor());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals(20050600, kd.floor());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals(20050000, kd.floor());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
@@ -101,25 +101,25 @@
@Test
public void testToString() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals("20050603", kd.toString());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals("20050600", kd.toString());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals("20050000", kd.toString());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
@@ -128,25 +128,25 @@
@Test
public void testToCeilString() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals("20050603", kd.toCeilString());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals("20050699", kd.toCeilString());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals("20059999", kd.toCeilString());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
@@ -156,25 +156,25 @@
@Test
public void testToFloorString() {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals("20050603", kd.toFloorString());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals("20050600", kd.toFloorString());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals("20050000", kd.toFloorString());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
@@ -183,25 +183,25 @@
@Test
public void testDisplay () {
- KorapDate kd = new KorapDate("2005-06-03");
+ KrillDate kd = new KrillDate("2005-06-03");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(3, kd.day);
assertEquals("2005-06-03", kd.toDisplay());
- kd = new KorapDate("2005-06");
+ kd = new KrillDate("2005-06");
assertEquals(2005, kd.year);
assertEquals(6, kd.month);
assertEquals(0, kd.day);
assertEquals("2005-06", kd.toDisplay());
- kd = new KorapDate("2005");
+ kd = new KrillDate("2005");
assertEquals(2005, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
assertEquals("2005", kd.toDisplay());
- kd = new KorapDate();
+ kd = new KrillDate();
assertEquals(0, kd.year);
assertEquals(0, kd.month);
assertEquals(0, kd.day);
diff --git a/src/test/java/de/ids_mannheim/korap/util/TestKorapString.java b/src/test/java/de/ids_mannheim/korap/util/TestKrillString.java
similarity index 86%
rename from src/test/java/de/ids_mannheim/korap/util/TestKorapString.java
rename to src/test/java/de/ids_mannheim/korap/util/TestKrillString.java
index 38d3a35..14b4b14 100644
--- a/src/test/java/de/ids_mannheim/korap/util/TestKorapString.java
+++ b/src/test/java/de/ids_mannheim/korap/util/TestKrillString.java
@@ -3,13 +3,13 @@
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import static de.ids_mannheim.korap.util.KorapString.*;
+import static de.ids_mannheim.korap.util.KrillString.*;
import de.ids_mannheim.korap.util.QueryException;
/**
* @author diewald
*/
-public class TestKorapString {
+public class TestKrillString {
@Test
public void testHTMLescape() {