Updated field type:date in the metadata test.

Change-Id: Ic904010cd8933ae546b5fde522c7f6f8683f0834
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java b/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
index 5b4f0f3..d0407ee 100644
--- a/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
+++ b/core/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
@@ -37,8 +37,8 @@
         KustvaktArgs kargs = new KustvaktArgs();
         for (int i = 0; i < args.length; i++) {
             switch ((args[i])) {
-                case "--config":
-                    kargs.setConfig(args[i + 1]);
+                case "--spring-config":
+                    kargs.setSpringConfig(args[i + 1]);
                     break;
                 case "--port":
                     kargs.setPort(Integer.valueOf(args[i + 1]));
@@ -47,8 +47,8 @@
                     StringBuffer b = new StringBuffer();
 
                     b.append("Parameter description: \n")
-                            .append("--config  <Path to spring configuration file> : Configuration file\n")
-                            .append("--port  <Server port> : Port under which the server is accessible \n")
+                            .append("--spring-config  <Spring XML configuration filename in classpath>\n")
+                            .append("--port  <Server port number>\n")
                             //                            .append("--props  <Path to kustvakt properties> : list of configuration properties\n")
                             .append("--help : This help menu\n");
                     System.out.println(b.toString());
@@ -74,7 +74,7 @@
                 new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
         contextHandler.setContextPath("/");
         contextHandler.setInitParameter("contextConfigLocation",
-                "classpath:" + kargs.getConfig());
+                "classpath:" + kargs.getSpringConfig());
 
         ServletContextListener listener = new ContextLoaderListener();
         contextHandler.addEventListener(listener);
@@ -110,7 +110,7 @@
     public static class KustvaktArgs {
 
         @Getter
-        private String config;
+        private String springConfig;
         private int port;
         private String[] rootPackages;
         private boolean init;
@@ -118,7 +118,7 @@
 
         public KustvaktArgs () {
             this.port = -1;
-            this.config = null;
+            this.springConfig = null;
             this.init = false;
         }
 
diff --git a/full/Changes b/full/Changes
index 73efd25..a052996 100644
--- a/full/Changes
+++ b/full/Changes
@@ -1,5 +1,5 @@
 version 0.60 release
-01/03/2018
+08/03/2018
 	- set up mail settings using localhost port 25 (margaretha)
 	- added mail template in kustvakt configuration (margaretha)
 	- added mail settings to readme (margaretha)
@@ -8,6 +8,7 @@
 	- enabled custom implementation for email address retrieval (margaretha)
 	- removed old policy and deprecated code (margaretha)
 	- moved authentication related code to /full (margaretha)
+	- removed spring config option in KustvaktServer (margaretha)
 
 version 0.59.10	
 20/02/2018 
diff --git a/full/pom.xml b/full/pom.xml
index 20a8572..62ded64 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -248,18 +248,6 @@
 			<version>${spring-security.version}</version>
 		</dependency>
 
-		<!-- jetty -->
-		<!-- <dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-jndi</artifactId>
-			<version>${jetty.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-plus</artifactId>
-			<version>${jetty.version}</version>
-		</dependency> -->
-
 		<!-- velocity -->
 		<dependency>
 			<groupId>org.apache.velocity</groupId>
@@ -295,6 +283,7 @@
 			<artifactId>flyway-core</artifactId>
 			<version>4.0</version>
 		</dependency>
+		
 	</dependencies>
 
 </project>
\ No newline at end of file
diff --git a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java
index 024296f..caf37e5 100644
--- a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java
+++ b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktServer.java
@@ -42,12 +42,8 @@
 		if (kargs == null)
 			System.exit(0);
 
-        if (kargs.getConfig() == null){
-//            BeansFactory.loadFileContext(kargs.getConfig());
-//      }
-//      else {
-            kargs.setConfig("default-config.xml");
-//          BeansFactory.loadClasspathContext("default-config.xml");
+        if (kargs.getSpringConfig() == null){
+            kargs.setSpringConfig("default-config.xml");
         }
         kargs.setRootPackages(new String[] { "de.ids_mannheim.korap.web.utils",
                 "de.ids_mannheim.korap.web.service.full" });
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index 72a875b..f205609 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -15,8 +15,6 @@
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.SecurityContext;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 
@@ -56,7 +54,7 @@
     @Autowired
     private UserGroupService service;
 
-    /** Returns all user-groups wherein a user is an active or pending member.
+    /** Returns all user-groups in which a user is an active or a pending member.
      * 
      * @param securityContext
      * @return a list of user-groups
diff --git a/lite/Changes b/lite/Changes
index 6355c0f..c71a518 100644
--- a/lite/Changes
+++ b/lite/Changes
@@ -1,8 +1,14 @@
+version 0.60
+08/03/2018	
+    - updated field type:date in the metadata test (margaretha)
+    - removed loading application context via BeanFactory (margaretha)
+
 version 0.59.9 
 01/02/2018
 	- renamed light to lite (margaretha)
 	- added Changes file (margaretha)
 	- updated library versions and java environment (margaretha)
+	- added metadata test (diewald)
 	
 version 0.59.8 
 17/01/2018 
diff --git a/lite/pom.xml b/lite/pom.xml
index b3435ec..9cc85a1 100644
--- a/lite/pom.xml
+++ b/lite/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-lite</artifactId>
-	<version>0.59.9</version>
+	<version>0.60</version>
 	<properties>
 		<java.version>1.8</java.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
index 96061ac..2e3045a 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
@@ -1,6 +1,5 @@
 package de.ids_mannheim.korap.server;
 
-import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.web.KustvaktBaseServer;
 
 public class KustvaktLiteServer extends KustvaktBaseServer {
@@ -10,14 +9,9 @@
         KustvaktLiteServer server = new KustvaktLiteServer();
         kargs = server.readAttributes(args);
 
-		if (kargs == null)
-			System.exit(0);
+        if (kargs == null) System.exit(0);
 
-        if (kargs.getConfig() == null) {
-            kargs.setConfig("lite-config.xml");
-        }
-        
-        BeansFactory.loadClasspathContext(kargs.getConfig());
+        kargs.setSpringConfig("lite-config.xml");
         kargs.setRootPackages(
                 new String[] { "de.ids_mannheim.korap.web.service.lite" });
         rootPackages = "de.ids_mannheim.korap.web.service.lite";
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
index 1d1c41b..79b1786 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
@@ -28,11 +28,13 @@
 /**
  * Created by hanl on 29.04.16.
  * 
- * @author margaretha
- * @date 17/01/2017
+ * @author margaretha, diewald
+ * @date 08/03/2018
  * 
  * Recent changes:
  * - removed test configuration using FastJerseyLightTest
+ * - added metadata test
+ * - updated field type:date 
  */
 public class LiteServiceTest extends JerseyTest{
 
@@ -271,9 +273,9 @@
                 response.getStatus());
         String resp = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(resp);
-		System.err.println(node.toString());
+//		System.err.println(node.toString());
 
-		Iterator fieldIter = node.at("/document/fields").elements();
+		Iterator<JsonNode> fieldIter = node.at("/document/fields").elements();
 
 		int checkC = 0;
 		while (fieldIter.hasNext()) {
@@ -308,8 +310,8 @@
 				checkC++;
 				break;
 			case "pubDate":
-				assertEquals("type:number", field.at("/type").asText());
-				assertEquals(19820000, field.at("/value").asInt());
+				assertEquals("type:date", field.at("/type").asText());
+				assertEquals(1982, field.at("/value").asInt());
 				checkC++;
 				break;
 			};