Rename CollectionRewrite to AvailabilityRewrite

Change-Id: If6de4f6bfd8234125f78fc5aedd6746e16be279e
diff --git a/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java b/src/main/java/de/ids_mannheim/korap/rewrite/AvailabilityRewrite.java
similarity index 96%
rename from src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java
rename to src/main/java/de/ids_mannheim/korap/rewrite/AvailabilityRewrite.java
index 970efdd..75e9094 100644
--- a/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java
+++ b/src/main/java/de/ids_mannheim/korap/rewrite/AvailabilityRewrite.java
@@ -23,7 +23,7 @@
 import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
 
 /**
- * CollectionRewrite determines which availability field values are
+ * AvailabilityRewrite determines which availability field values are
  * possible for a user with respect to login and location of access.
  * 
  * <br/><br/>
@@ -43,13 +43,13 @@
  * @author margaretha
  * @see CorpusAccess
  */
-public class CollectionRewrite implements RewriteTask.RewriteQuery {
+public class AvailabilityRewrite implements RewriteTask.RewriteQuery {
 
-    public static Logger jlog = LogManager.getLogger(CollectionRewrite.class);
+    public static Logger jlog = LogManager.getLogger(AvailabilityRewrite.class);
 
     public static boolean DEBUG = false;
 
-    public CollectionRewrite () {
+    public AvailabilityRewrite () {
         super();
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java b/src/test/java/de/ids_mannheim/korap/rewrite/AvailabilityRewriteTest.java
similarity index 98%
rename from src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java
rename to src/test/java/de/ids_mannheim/korap/rewrite/AvailabilityRewriteTest.java
index 7a19e1f..ef7393f 100644
--- a/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/rewrite/AvailabilityRewriteTest.java
@@ -18,7 +18,7 @@
  * @author hanl
  * @date 03/09/2015
  */
-public class CollectionRewriteTest extends SpringJerseyTest {
+public class AvailabilityRewriteTest extends SpringJerseyTest {
 
     @Autowired
     public KustvaktConfiguration config;
@@ -172,7 +172,7 @@
     public void testPublicCollectionRewriteEmptyAdd ()
             throws KustvaktException {
         RewriteHandler handler = new RewriteHandler(config);
-        handler.add(CollectionRewrite.class);
+        handler.add(AvailabilityRewrite.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
         String org = s.toJSON();
@@ -192,7 +192,7 @@
     public void testPublicCollectionRewriteNonEmptyAdd ()
             throws KustvaktException {
         RewriteHandler handler = new RewriteHandler(config);
-        handler.add(CollectionRewrite.class);
+        handler.add(AvailabilityRewrite.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
         s.setCollection("(docSigle=WPD_AAA & textClass=wissenschaft)");
diff --git a/src/test/java/de/ids_mannheim/korap/rewrite/ResultRewriteTest.java b/src/test/java/de/ids_mannheim/korap/rewrite/ResultRewriteTest.java
index 77767a0..ba2cbfd 100644
--- a/src/test/java/de/ids_mannheim/korap/rewrite/ResultRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/rewrite/ResultRewriteTest.java
@@ -7,7 +7,7 @@
 import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.config.TestVariables;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.rewrite.CollectionRewrite;
+import de.ids_mannheim.korap.rewrite.AvailabilityRewrite;
 import de.ids_mannheim.korap.rewrite.RewriteHandler;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
@@ -22,7 +22,7 @@
 
     @Test
     public void testPostRewriteNothingToDo () throws KustvaktException {
-        assertEquals(true, ha.add(CollectionRewrite.class),
+        assertEquals(true, ha.add(AvailabilityRewrite.class),
                 "Handler could not be added to rewrite handler instance!");
         String v = ha.processResult(TestVariables.RESULT, null);
         assertEquals(JsonUtils.readTree(TestVariables.RESULT),
diff --git a/src/test/resources/test-config-dnb.xml b/src/test/resources/test-config-dnb.xml
index ac4d373..3c74254 100644
--- a/src/test/resources/test-config-dnb.xml
+++ b/src/test/resources/test-config-dnb.xml
@@ -213,23 +213,17 @@
 	<!-- Rewrite -->
 	<bean id="foundryRewrite"
 		class="de.ids_mannheim.korap.rewrite.FoundryRewrite" />
-	<bean id="collectionRewrite"
-		class="de.ids_mannheim.korap.rewrite.CollectionRewrite" />
-	<bean id="collectionCleanRewrite"
-		class="de.ids_mannheim.korap.rewrite.CollectionCleanRewrite" />
+	<bean id="availabilityRewrite"
+		class="de.ids_mannheim.korap.rewrite.AvailabilityRewrite" />
 	<bean id="virtualCorpusRewrite"
 		class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite" />
-	<bean id="collectionConstraint"
-		class="de.ids_mannheim.korap.rewrite.CollectionConstraint" />
 	<bean id="queryReferenceRewrite"
 		class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite" />
 
 	<util:list id="rewriteTasks"
 		value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
-		<!-- <ref bean="collectionConstraint" /> <ref bean="collectionCleanRewrite" 
-			/> -->
 		<ref bean="foundryRewrite" />
-		<ref bean="collectionRewrite" />
+		<ref bean="availabilityRewrite" />
 		<ref bean="virtualCorpusRewrite" />
 		<ref bean="queryReferenceRewrite" />
 	</util:list>
diff --git a/src/test/resources/test-config-icc.xml b/src/test/resources/test-config-icc.xml
index 4924c3c..0c09b1d 100644
--- a/src/test/resources/test-config-icc.xml
+++ b/src/test/resources/test-config-icc.xml
@@ -217,23 +217,14 @@
 	<!-- Rewrite -->
 	<bean id="foundryRewrite"
 		class="de.ids_mannheim.korap.rewrite.FoundryRewrite" />
-	<bean id="collectionRewrite"
-		class="de.ids_mannheim.korap.rewrite.CollectionRewrite" />
-	<bean id="collectionCleanRewrite"
-		class="de.ids_mannheim.korap.rewrite.CollectionCleanRewrite" />
 	<bean id="virtualCorpusRewrite"
 		class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite" />
-	<bean id="collectionConstraint"
-		class="de.ids_mannheim.korap.rewrite.CollectionConstraint" />
 	<bean id="queryReferenceRewrite"
 		class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite" />
 
 	<util:list id="rewriteTasks"
 		value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
-		<!-- <ref bean="collectionConstraint" /> <ref bean="collectionCleanRewrite" 
-			/> -->
 		<ref bean="foundryRewrite" />
-		<!-- <ref bean="collectionRewrite" /> -->
 		<ref bean="virtualCorpusRewrite" />
 		<ref bean="queryReferenceRewrite" />
 	</util:list>
diff --git a/src/test/resources/test-config.xml b/src/test/resources/test-config.xml
index 1f8beba..343ca96 100644
--- a/src/test/resources/test-config.xml
+++ b/src/test/resources/test-config.xml
@@ -190,8 +190,8 @@
 	<!-- Rewrite -->
 	<bean id="foundryRewrite"
 		class="de.ids_mannheim.korap.rewrite.FoundryRewrite" />
-	<bean id="collectionRewrite"
-		class="de.ids_mannheim.korap.rewrite.CollectionRewrite" />
+	<bean id="availabilityRewrite"
+		class="de.ids_mannheim.korap.rewrite.AvailabilityRewrite" />
 	<bean id="virtualCorpusRewrite"
 		class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite" />
 	<bean id="queryReferenceRewrite"
@@ -203,7 +203,7 @@
 	<util:list id="rewriteTasks"
 		value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
 		<ref bean="foundryRewrite" />
-		<ref bean="collectionRewrite" />
+		<ref bean="availabilityRewrite" />
 		<ref bean="virtualCorpusRewrite" />
 		<ref bean="queryReferenceRewrite" />
 		<ref bean="queryContextRewrite" />