Importing WformServices and GlemmServices
Change-Id: Ifa95576d69e0d3863f63d3fdedb48c2c21cf64bc
diff --git a/WformServices/WebContent/WEB-INF/WformServices.properties b/WformServices/WebContent/WEB-INF/WformServices.properties
new file mode 100644
index 0000000..8df4067
--- /dev/null
+++ b/WformServices/WebContent/WEB-INF/WformServices.properties
@@ -0,0 +1,22 @@
+# WordformServices properties:
+# expected in /WEB-INF/.
+
+## General properties:
+GS_WorkingPath = /home/bodmer/KorAP/GlemmServices/work-live
+
+## Loging:
+
+# fnameOut = GS_WorkingPath + "/WformmServices.log";
+#fnameOut = WformServices-t.log
+fnameOut = WformServices.log
+# fnameErr = GS_WorkingPath + "/WformServices.err";
+#fnameErr = WformServices-t.err
+fnameErr = WformServices.err
+
+## Communicating with the GlemmServices
+URLGlemmServer = http://c0r4ft
+GlemmPort = 40913
+#URLGlemmServices = GlemmServices-0.2-Test
+URLGlemmServices = GlemmServices
+LemmaRequestPath = index/info/lemma
+
\ No newline at end of file
diff --git a/WformServices/WebContent/WEB-INF/plugin.html b/WformServices/WebContent/WEB-INF/plugin.html
new file mode 100644
index 0000000..9936067
--- /dev/null
+++ b/WformServices/WebContent/WEB-INF/plugin.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Wordform Services (including Glemm Services)</title>
+ <!-- load client javascript library -->
+ <!-- live-version: script src="https://korap.ids-mannheim.de/js/korap-plugin-0.2.js"
+ data-server="https://korap.ids-mannheim.de/"></script -->
+ <!-- Testversion: -->
+ <script src="https://korap.ids-mannheim.de/instance/test/js/korap-plugin-0.2.js"
+ data-server="https://korap.ids-mannheim.de/instance/test"></script>
+ </head>
+ <body>
+ <script>
+ let data = {
+ 'action' : 'pipe',
+ <!-- KoralQuery mit POST Request an diesen service schicken; dahinter steht der Wordform Service, dahinter der Glemm Service. -->
+ <!-- ohne proxy: 'service' : 'http://c0r4ft.ids-mannheim.de:40913/wformServices-0.1-SNAPSHOT/wformServices/query' -->
+ <!-- mit proxy : 'service' : 'https://korap.ids-mannheim.de/proxy/c0r4ft/wformServices-0.1-SNAPSHOT/wformServices/query' -->
+ <!-- ab Version 0.2 der WformServices enthält die URL zu den Services keine Versionsnummer mehr: -->
+ 'service' : 'https://korap.ids-mannheim.de/proxy/c0r4ft/wformServices/wformServices/query'
+ };
+
+ function pluginit (p) {
+ p.onMessage = function(msg) {
+ if (msg.key == 'glemm') {
+ if (msg.value) {
+ data['job'] = 'add';
+ }
+ else {
+ data['job'] = 'del';
+ };
+ KorAPlugin.sendMsg(data);
+ };
+ };
+ };
+ </script>
+ </body>
+</html>
\ No newline at end of file
diff --git a/WformServices/WebContent/WEB-INF/web.xml b/WformServices/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000..1b3ae97
--- /dev/null
+++ b/WformServices/WebContent/WEB-INF/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- kopiert aus https://blog.dejavu.sk/registering-resources-and-providers-in-jersey-2/ , 09.12.19/FB -->
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>WordformServices mit Jersey REST</servlet-name>
+ <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
+
+ <!-- Register JAX-RS Application, if needed. -->
+ <!-- init-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>my.package.MyApplication</param-value>
+ </init-param -->
+
+ <!-- Register resources and providers under my.package. -->
+ <init-param>
+ <param-name>jersey.config.server.provider.packages</param-name>
+ <param-value>de.korap.services</param-value>
+ </init-param>
+
+ <!-- Register my custom provider (not needed if it's in my.package) AND LoggingFilter. -->
+ <init-param>
+ <param-name>jersey.config.server.provider.classnames</param-name>
+ <param-value>de.korap.services</param-value>
+ </init-param>
+
+ <!-- Enable Tracing support. -->
+ <init-param>
+ <param-name>jersey.config.server.tracing</param-name>
+ <param-value>ALL</param-value>
+ </init-param>
+
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>WordformServices mit Jersey REST</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file