Renamed light to lite and updated lite version number.
Change-Id: Ib1ae3d05c413efd5d81cf177d998680ea5c338f9
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java b/core/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
index 6955621..d9e2a73 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
@@ -1,17 +1,14 @@
package de.ids_mannheim.korap.config;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
-import de.ids_mannheim.korap.user.Userdata;
-import de.ids_mannheim.korap.web.CoreResponseHandler;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Collection;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collection;
+import de.ids_mannheim.korap.web.CoreResponseHandler;
/**
* User: hanl
@@ -20,8 +17,6 @@
*/
public class BeansFactory {
- private static final String CONFIG_FILE = "light-config.xml";
-
private static ContextHolder beanHolder;
@@ -50,7 +45,7 @@
public static int loadClasspathContext (String ... files) {
ApplicationContext context;
if (files.length == 0)
- context = new ClassPathXmlApplicationContext(CONFIG_FILE);
+ throw new IllegalArgumentException("Spring XML config file is not specified.");
else
context = new ClassPathXmlApplicationContext(files);
ContextHolder h = new ContextHolder(context) {};
diff --git a/lite/pom.xml b/lite/pom.xml
index 4215b5e..7dcb096 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.8</version>
+ <version>0.59.9</version>
<properties>
<java.version>1.7</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 338c43f..c0e31f3 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
@@ -3,29 +3,29 @@
import de.ids_mannheim.korap.config.BeansFactory;
import de.ids_mannheim.korap.web.KustvaktBaseServer;
-public class KustvaktLiteServer extends KustvaktBaseServer{
+public class KustvaktLiteServer extends KustvaktBaseServer {
-
+
public static void main (String[] args) throws Exception {
KustvaktLiteServer server = new KustvaktLiteServer();
kargs = server.readAttributes(args);
- if (kargs.getConfig() != null)
- BeansFactory.loadFileContext(kargs.getConfig());
- else{
- kargs.setConfig("light-config.xml");
- BeansFactory.loadClasspathContext();
+ if (kargs.getConfig() == null) {
+ kargs.setConfig("lite-config.xml");
}
- kargs.setRootPackages(new String[] { "de.ids_mannheim.korap.web.service.light" });
- rootPackages = "de.ids_mannheim.korap.web.service.light";
+ BeansFactory.loadClasspathContext(kargs.getConfig());
+ kargs.setRootPackages(
+ new String[] { "de.ids_mannheim.korap.web.service.lite" });
+ rootPackages = "de.ids_mannheim.korap.web.service.lite";
+
server.start();
}
-
+
@Override
protected void setup () {
// TODO Auto-generated method stub
-
+
}
}
diff --git a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java b/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
similarity index 98%
rename from lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
rename to lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
index 572b176..73ce86e 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/web/service/lite/LiteService.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.light;
+package de.ids_mannheim.korap.web.service.lite;
import java.util.ArrayList;
import java.util.List;
@@ -53,9 +53,9 @@
@Controller
@Path("/")
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class LightService {
+public class LiteService {
- private static Logger jlog = LoggerFactory.getLogger(LightService.class);
+ private static Logger jlog = LoggerFactory.getLogger(LiteService.class);
@Autowired
CoreResponseHandler kustvaktResponseHandler;
@@ -68,7 +68,7 @@
private KustvaktConfiguration config;
- public LightService () {
+ public LiteService () {
// Karang URI
UriBuilder builder = UriBuilder.fromUri("http://10.0.10.13").port(9997);
this.graphDBhandler = new ClientsHandler(builder.build());
diff --git a/lite/src/main/resources/light-config.xml b/lite/src/main/resources/lite-config.xml
similarity index 100%
rename from lite/src/main/resources/light-config.xml
rename to lite/src/main/resources/lite-config.xml
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
similarity index 98%
rename from lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java
rename to lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
index 3b694af..b0d6284 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/LiteServiceTest.java
@@ -33,7 +33,7 @@
* Recent changes:
* - removed test configuration using FastJerseyLightTest
*/
-public class LightServiceTest extends JerseyTest{
+public class LiteServiceTest extends JerseyTest{
public static final String classPackage = "de.ids_mannheim.korap.web.service.light";
@@ -49,7 +49,7 @@
.servletClass(SpringServlet.class)
.contextListenerClass(ContextLoaderListener.class)
.contextParam("contextConfigLocation",
- "classpath:light-config.xml")
+ "classpath:lite-config.xml")
.build();
}