You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/02/19 18:04:21 UTC
[50/51] [abbrv] libraries/ compiling
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/panels/COPYING
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/panels/COPYING b/launchers/lmf-installer/src/main/resources/panels/COPYING
deleted file mode 100644
index 66a27ec..0000000
--- a/launchers/lmf-installer/src/main/resources/panels/COPYING
+++ /dev/null
@@ -1,177 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/panels/installerInfo.html
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/panels/installerInfo.html b/launchers/lmf-installer/src/main/resources/panels/installerInfo.html
deleted file mode 100644
index 5f0064d..0000000
--- a/launchers/lmf-installer/src/main/resources/panels/installerInfo.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>LMF</title>
- <style type="text/css">
- html, body {
- background: #eeeeee url('lmfbck') no-repeat right top;
- font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
- margin: 5px 30px auto 20px;
- }
- </style>
- </head>
- <body>
- <h1>Welcome to LMF ${LMF_VERSION}</h1>
- <h2>Installation Wizard</h2>
- <p>
- The Linked Media Framework is a general purpose framework for building Linked Data and
- Semantic Web applications. LMF bundles together Apache Marmotta, Apache Stanbol, Apache
- Solr and Open Refine. It provides commonly used services linked Linked Data Server,
- Linked Data Client, SPARQL Endpoint, Semantic Search, Rule-based Reasoner, Versioning, etc.
- that can be used for building custom Semantic Web applications using e.g. the LMF Client
- Libraries available on the project website.
- </p>
- <p>
- This wizard will guide you through a basic installation of the Linked Media Framework Server.
- It is a fully self-contained installation, meaning there are no other dependencies than Java
- itself. The installer will install Apache Tomcat ${TOMCAT_VERSION}, the LMF Web and Core modules,
- and optionally all modules that you select in the following panels.
- </p>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/refine/web.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/refine/web.xml b/launchers/lmf-installer/src/main/resources/refine/web.xml
deleted file mode 100644
index a79652c..0000000
--- a/launchers/lmf-installer/src/main/resources/refine/web.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
- "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
-
-<web-app>
-
- <display-name>Google Refine</display-name>
- <description>Google Refine Webapp</description>
-
- <!--+
- | This forces all the session cookies to default to the root path.
- | to allow sessions to work even when butterfly is handling
- | multiple zones.
- | NOTE: this is jetty-specific, so other web-app servers
- | might require different parameters.
- +-->
- <!--
- <context-param>
- <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
- <param-value>/</param-value>
- </context-param>
- -->
-
- <servlet>
- <servlet-name>refine</servlet-name>
- <servlet-class>com.google.refine.RefineServlet</servlet-class>
- <init-param>
- <param-name>refine.version</param-name>
- <param-value>2.5-LMF</param-value>
- </init-param>
- <init-param>
- <param-name>refine.revision</param-name>
- <param-value>$REVISION</param-value>
- </init-param>
- <init-param>
- <param-name>refine.data</param-name>
- <param-value>%{INSTALL_PATH}/refine/</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>refine</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/refpacks/refine.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/refpacks/refine.xml b/launchers/lmf-installer/src/main/resources/refpacks/refine.xml
deleted file mode 100644
index 580109d..0000000
--- a/launchers/lmf-installer/src/main/resources/refpacks/refine.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<installation version='1.0'>
- <packs>
- <pack name="OpenRefine" required="no">
- <description>OpenRefine, used for data management and converting legacy data into Linked Data.</description>
- <file src="../../target/refine.war" targetdir="$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/refine/" unpack="true"/>
- <file src="refine/web.xml" targetdir="$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/refine/WEB-INF/" override="true"/>
- <parsable type="shell" targetfile="$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/refine/WEB-INF/web.xml" parse="yes"/>
- </pack>
- </packs>
-</installation>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/shortcuts/Unix_shortcutSpec.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/shortcuts/Unix_shortcutSpec.xml b/launchers/lmf-installer/src/main/resources/shortcuts/Unix_shortcutSpec.xml
deleted file mode 100644
index b37a3fd..0000000
--- a/launchers/lmf-installer/src/main/resources/shortcuts/Unix_shortcutSpec.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<shortcuts>
-
- <skipIfNotSupported/>
- <programGroup defaultName="Linked Media Framework"
- location="applications"/>
-
- <shortcut
- name="Start Linked Media Framework"
- programGroup="yes"
- desktop="yes"
- applications="no"
- startMenu="no"
- startup="no"
- target="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/bin/startup.sh"
- workingDirectory="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/"
- commandLine=""
- initialState="noShow"
- iconFile="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/icons/icon_start.png"
- iconIndex="0"
- url=""
- type="Application"
- encoding="UTF-8"
- description="This will start the Linked Media Framework Server">
- </shortcut>
-
- <shortcut
- name="Stop Linked Media Framework"
- programGroup="yes"
- desktop="yes"
- applications="no"
- startMenu="no"
- startup="no"
- target="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/bin/shutdown.sh"
- workingDirectory="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/"
- commandLine=""
- initialState="noShow"
- iconFile="\$INSTALL_PATH/apache-tomcat-${TOMCAT_VERSION}/icons/icon_stop.png"
- iconIndex="0"
- url=""
- type="Application"
- encoding="UTF-8"
- description="This will shutdown the Linked Media Framework Server">
- </shortcut>
-
-
-</shortcuts>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/shortcuts/shortcutSpec.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/shortcuts/shortcutSpec.xml b/launchers/lmf-installer/src/main/resources/shortcuts/shortcutSpec.xml
deleted file mode 100644
index 7439694..0000000
--- a/launchers/lmf-installer/src/main/resources/shortcuts/shortcutSpec.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<shortcuts>
- <skipIfNotSupported/>
- <programGroup defaultName="Salzburg NewMediaLab\\Linked Media Framework"
- location="applications"/>
- <shortcut
- name="Start Linked Media Framework"
- target="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}\bin\startup.bat"
- commandLine=""
- workingDirectory="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}"
- description="This will start the Linked Media Framework Server"
- iconFile="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}\icons\icon_start.ico"
- iconIndex="0"
- initialState="noShow"
- programGroup="yes"
- desktop="yes"
- applications="no"
- startMenu="no"
- startup="no">
-
- </shortcut>
-
- <shortcut
- name="Shutdown Linked Media Framework"
- target="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}\bin\shutdown.bat"
- commandLine=""
- workingDirectory="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}"
- description="This will shutdown the Linked Media Framework Server"
- iconFile="$INSTALL_PATH\apache-tomcat-${TOMCAT_VERSION}\icons\icon_stop.ico"
- iconIndex="0"
- initialState="noShow"
- programGroup="yes"
- desktop="yes"
- applications="no"
- startMenu="no"
- startup="no">
-
- </shortcut>
-
-</shortcuts>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/tomcat/index.jsp
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/tomcat/index.jsp b/launchers/lmf-installer/src/main/resources/tomcat/index.jsp
deleted file mode 100644
index 984833d..0000000
--- a/launchers/lmf-installer/src/main/resources/tomcat/index.jsp
+++ /dev/null
@@ -1,166 +0,0 @@
-<%--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
---%>
-<html>
-
- <head>
- <title>Linked Media Framework</title>
-
- <script type="text/javascript" src="/LMF/webjars/jquery/1.8.2/jquery.min.js"></script>
-
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Default-Style" content="blue">
- <link href="/LMF/core/public/style/javadoc.css" rel="stylesheet" type="text/css" />
- <link href="/LMF/core/public/style/style.css" rel="stylesheet" type="text/css" />
- <link href="/LMF/core/public/style/scheme/blue.css" title="blue" rel="stylesheet" type="text/css" />
- <link href="/LMF/core/public/style/scheme/dark.css" title="dark" rel="alternate stylesheet" type="text/css" />
- <link href="/LMF/core/public/img/icon/lmf.ico" rel="SHORTCUT ICON" />
-
- <style type="text/css">
- .hidden {
- display: none;
- }
- </style>
- </head>
-
- <body>
-
- <div id="wrapper">
-
- <div id="header">
- <a id="logo" href="http://localhost:8080/">
- <img src="/LMF/core/public/img/logo/lmf-logo.png">
- </a>
- </div>
-
- <div id="center" class="clear" style="margin: 2em 5em 2em 5em; width: auto;">
-
- <div id="content" style="min-height: 600px;">
-
- <h1>Welcome to the Linked Media Framework</h1>
-
- <p>
- The Linked Media Framework (LMF) is an all-in-one solution for publishing your legacy data as Linked Data,
- connecting it with the Web of Data and build fascinating applications on top. The LMF can bundle several
- applications in a single installation to make your life easier. Currently, the following applications are
- installed:
- </p>
-
- <h2>Administration</h2>
-
- <ul id="service_list">
- <li id="service_lmf" class="hidden">
- <a href="/LMF">Linked Media Framework</a> - the administration and debugging interface of the main
- LMF server. Go here to configure LMF settings and access the data you stored.
- </li>
- <li id="service_stanbol" class="hidden">
- <a href="/LMF/stanbol/config/">Apache Stanbol</a> - administration and debugging interface of the information
- extraction tool Apache Stanbol. Go here if you need to customize Stanbol settings or want to
- experiment with Stanbol.
- </li>
- <li><a href="http://code.google.com/p/lmf/wiki/TableOfContents">Documentation</a> - the complete documentation for
- the Linked Media Framework, including module descriptions, guides, and background information.</li>
- </ul>
-
-
- <h2>Applications</h2>
-
- <ul id="application_list">
- <li id="service_refine" class="hidden">
- <a href="/refine">Open Refine</a> - customized version of the data management tool Open Refine,
- including RDF and LMF extensions, preconfigured for the LMF. Go here if you want to publish legacy
- data as Linked Data.
- </li>
- <li id="application_skosjs" class="hidden">
- <a href="/LMF/skos/index.html">SKOSjs</a> - a SKOS thesaurus manager building on top of the
- Linked Media Framework. Go here to create and manage your own thesauruses or import existing
- thesauruses.
- </li>
- </ul>
-
- <h2>Demos</h2>
-
- <ul id="demo_list">
- <li id="demo_books" class="hidden">
- <a href="/LMF/demo-books/about.html">LMF Books Demo</a> - start from a legacy CSV data file and
- convert it into a Semantic Search including enriched information from the Linked Data Cloud.
- Demonstrates Linked Data Caching, Thesaurus Management, Reasoning, and Semantic Search.
- </li>
- </ul>
-
- </div>
-
- </div>
-
- <div class="clear"></div>
-
- <div id="footer">
- <div id="footer_line">
- <span>
- <a href="http://lmf.googlecode.com">LMF</a> is a project of <a href="http://www.newmedialab.at/">Salzburg NewMediaLab</a>. <br/>
- Copyright © 2013 <a href="http://www.salzburgresearch.at">Salzburg Research</a>. <br/>
- Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0.</a>
- </span>
- </div>
- </div>
-
- </div>
-
- <script type="text/javascript">
- var checkService = function(uri, callback) {
- $.ajax({
- url: uri,
- type: "HEAD",
- success: callback,
- error: function(jqXHR, textStatus, errorThrown) {
-
- }
- });
- };
-
- $(document).ready(function() {
-
- checkService("/LMF",function(data) {
- $('#service_lmf').removeClass("hidden");
- });
-
- checkService("/refine",function(data) {
- $('#service_refine').removeClass("hidden");
- });
-
- checkService("/LMF/stanbol/config/entityhub",function(data) {
- $('#service_stanbol').removeClass("hidden");
- });
-
- checkService("/LMF/skos/index.html",function(data) {
- $('#application_skosjs').removeClass("hidden");
- });
-
- checkService("/LMF/demo-books/about.html",function(data) {
- $('#demo_books').removeClass("hidden");
- });
-
- checkService("/LMF/demo-social/index.gsp",function(data) {
- $('#demo_social').removeClass("hidden");
- });
-
- })
- </script>
-
- </body>
-
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/tomcat/server.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/tomcat/server.xml b/launchers/lmf-installer/src/main/resources/tomcat/server.xml
deleted file mode 100644
index 422d8b5..0000000
--- a/launchers/lmf-installer/src/main/resources/tomcat/server.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
-
- Copyright (C) 2013 Salzburg Research.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<!-- Note: A "Server" is not itself a "Container", so you may not
- define subcomponents such as "Valves" at this level.
- Documentation at /docs/config/server.html
- -->
-<Server port="8005" shutdown="SHUTDOWN">
- <!-- Security listener. Documentation at /docs/config/listeners.html
- <Listener className="org.apache.catalina.security.SecurityListener" />
- -->
- <!--APR library loader. Documentation at /docs/apr.html -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
- <!-- Prevent memory leaks due to use of particular java/javax APIs-->
- <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
-
- <!-- Check for initial host name and open up browser -->
- <Listener className="at.newmedialab.lmf.startup.StartupListener" />
-
- <!-- Display LMF Splash Screen -->
- <Listener className="at.newmedialab.lmf.splash.SplashScreenListener" />
-
- <!-- Register LMF Systray menu -->
- <Listener className="at.newmedialab.lmf.systray.SystrayListener" />
-
-
- <!-- Global JNDI resources
- Documentation at /docs/jndi-resources-howto.html
- -->
- <GlobalNamingResources>
- <!-- Editable user database that can also be used by
- UserDatabaseRealm to authenticate users
- -->
- <Resource name="UserDatabase" auth="Container"
- type="org.apache.catalina.UserDatabase"
- description="User database that can be updated and saved"
- factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
- pathname="conf/tomcat-users.xml" />
- </GlobalNamingResources>
-
- <!-- A "Service" is a collection of one or more "Connectors" that share
- a single "Container" Note: A "Service" is not itself a "Container",
- so you may not define subcomponents such as "Valves" at this level.
- Documentation at /docs/config/service.html
- -->
- <Service name="Catalina">
-
- <!--The connectors can use a shared executor, you can define one or more named thread pools-->
- <!--
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
- maxThreads="150" minSpareThreads="4"/>
- -->
-
-
- <!-- A "Connector" represents an endpoint by which requests are received
- and responses are returned. Documentation at :
- Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
- Java AJP Connector: /docs/config/ajp.html
- APR (HTTP/AJP) Connector: /docs/apr.html
- Define a non-SSL HTTP/1.1 Connector on port 8080
- -->
- <Connector port="8080" protocol="HTTP/1.1"
- connectionTimeout="20000"
- redirectPort="8443" URIEncoding="UTF-8" />
- <!-- A "Connector" using the shared thread pool-->
- <!--
- <Connector executor="tomcatThreadPool"
- port="8080" protocol="HTTP/1.1"
- connectionTimeout="20000"
- redirectPort="8443" />
- -->
- <!-- Define a SSL HTTP/1.1 Connector on port 8443
- This connector uses the JSSE configuration, when using APR, the
- connector should be using the OpenSSL style configuration
- described in the APR documentation -->
- <!--
- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
- maxThreads="150" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS" />
- -->
-
- <!-- Define an AJP 1.3 Connector on port 8009 -->
- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
-
-
- <!-- An Engine represents the entry point (within Catalina) that processes
- every request. The Engine implementation for Tomcat stand alone
- analyzes the HTTP headers included with the request, and passes them
- on to the appropriate Host (virtual host).
- Documentation at /docs/config/engine.html -->
-
- <!-- You should set jvmRoute to support load-balancing via AJP ie :
- <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
- -->
- <Engine name="Catalina" defaultHost="localhost">
-
- <!--For clustering, please take a look at documentation at:
- /docs/cluster-howto.html (simple how to)
- /docs/config/cluster.html (reference documentation) -->
- <!--
- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
- -->
-
- <!-- Use the LockOutRealm to prevent attempts to guess user passwords
- via a brute-force attack -->
- <Realm className="org.apache.catalina.realm.LockOutRealm">
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
- </Realm>
-
- <Host name="localhost" appBase="webapps"
- unpackWARs="true" autoDeploy="true">
-
- <Listener className="at.newmedialab.lmf.splash.ProgressListener" />
- <!-- SingleSignOn valve, share authentication between web applications
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
- -->
-
- <!-- Access log processes all example.
- Documentation at: /docs/config/valve.html
- Note: The pattern used is equivalent to using pattern="common" -->
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="localhost_access_log." suffix=".txt"
- pattern="%h %l %u %t "%r" %s %b" />
-
- </Host>
- </Engine>
- </Service>
-</Server>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/tomcat/setenv.bat
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/tomcat/setenv.bat b/launchers/lmf-installer/src/main/resources/tomcat/setenv.bat
deleted file mode 100644
index cf9faaf..0000000
--- a/launchers/lmf-installer/src/main/resources/tomcat/setenv.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@REM
-@REM Copyright (C) 2013 Salzburg Research.
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-set "JAVA_OPTS=-Xmx1024m -splash:%{INSTALL_PATH}\apache-tomcat-%{TOMCAT_VERSION}\icons\splashscreen.png -Dehcache.disk.store.dir=%{INSTALL_PATH}\lmf-home\cache -Dfile.encoding=UTF-8 -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
-set "LMF_HOME=%{INSTALL_PATH}\lmf-home"
-set "JAVA_HOME=%{JAVA_HOME}"
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-installer/src/main/resources/tomcat/setenv.sh
----------------------------------------------------------------------
diff --git a/launchers/lmf-installer/src/main/resources/tomcat/setenv.sh b/launchers/lmf-installer/src/main/resources/tomcat/setenv.sh
deleted file mode 100644
index 0957a24..0000000
--- a/launchers/lmf-installer/src/main/resources/tomcat/setenv.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-export LMF_HOME="%{INSTALL_PATH}/lmf-home"
-export JAVA_OPTS="$JAVA_OPTS -splash:%{INSTALL_PATH}/apache-tomcat-%{TOMCAT_VERSION}/icons/splashscreen.png -Xmx1024m -Dehcache.disk.store.dir=$LMF_HOME/cache -Dfile.encoding=UTF-8 -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
-export JAVA_HOME="%{JAVA_HOME}"
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/pom.xml b/launchers/lmf-splash/pom.xml
deleted file mode 100644
index f0e4422..0000000
--- a/launchers/lmf-splash/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2013 Salzburg Research.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.marmotta</groupId>
- <artifactId>lmf-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>lmf-splash</artifactId>
- <packaging>jar</packaging>
-
- <name>LMF Splash</name>
- <description>LMF Module offering splash screen for desktop environments</description>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina</artifactId>
- <version>7.0.35</version>
- </dependency>
- <dependency>
- <groupId>com.ezware.oxbow</groupId>
- <artifactId>task-dialog</artifactId>
- <version>1.3.6</version>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFContext.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFContext.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFContext.java
deleted file mode 100644
index acb190d..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFContext.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.common;
-
-import org.apache.catalina.core.StandardContext;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-import at.newmedialab.lmf.splash.SplashContextListener;
-import at.newmedialab.lmf.systray.SystrayListener;
-
-/**
- * A customised context implementation that adds a message to the splash screen when it is starting by registering
- * a context listener.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class LMFContext extends StandardContext {
-
- protected static Log log = LogFactory.getLog(LMFContext.class);
-
- public LMFContext() {
- super();
-
- // add the splash listener so the progress bar can be updated by this context
- addLifecycleListener(new SplashContextListener());
-
- // register LMF context in systray listener, the systray listener will check for menu entries stored
- // in the context attributes "systray.admin" and "systray.demo"
- SystrayListener.addServletContext(this);
-
- log.info("instantiated new LMF/Tomcat webapp context ("+getName()+")...");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFStartupHelper.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFStartupHelper.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFStartupHelper.java
deleted file mode 100644
index 12e3fd2..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/common/LMFStartupHelper.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.common;
-
-import at.newmedialab.lmf.startup.StartupListener;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Static utility methods used by several listeners.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class LMFStartupHelper {
-
- protected static Log log = LogFactory.getLog(LMFStartupHelper.class);
-
-
-
- public static final String getServerName() {
- Properties properties = getStartupProperties();
- return (String)properties.get("startup.host");
- }
-
-
- public static final int getServerPort() {
- try {
- MBeanServer mBeanServer = MBeanServerFactory.findMBeanServer(null).get(0);
- ObjectName name = new ObjectName("Catalina", "type", "Server");
- Object server = mBeanServer.getAttribute(name, "managedResource");
-
- Object service = Array.get(server.getClass().getMethod("findServices").invoke(server), 0);
- Object connector = Array.get(service.getClass().getMethod("findConnectors").invoke(service),0);
-
- int port = (Integer)connector.getClass().getMethod("getPort").invoke(connector);
- return port;
- } catch (Exception ex) {
- log.error("could not determine server port, using 8080");
- return 8080;
- }
- }
-
- public static final Properties getStartupProperties() {
- Properties result = new Properties();
-
- String lmf_home = System.getenv("LMF_HOME");
-
- if(lmf_home != null) {
-
- File dir_lmf_home = new File(lmf_home);
- dir_lmf_home.mkdirs();
-
- File startup_properties = new File(lmf_home + File.separator + "startup.properties");
- if(startup_properties.exists() && startup_properties.canRead()) {
- try {
- FileReader reader = new FileReader(startup_properties);
- result.load(reader);
- reader.close();
- } catch (IOException e) {
- log.error("I/O error while accessing startup properties file: "+e.getMessage());
- }
- }
-
- } else {
- log.error("LMF_HOME variable was not set; could not load/save properties");
- }
- return result;
- }
-
- public static final void storeStartupProperties(Properties properties) {
- String lmf_home = System.getenv("LMF_HOME");
-
- if(lmf_home != null) {
-
- File dir_lmf_home = new File(lmf_home);
- dir_lmf_home.mkdirs();
-
- File startup_properties = new File(lmf_home + File.separator + "startup.properties");
- if(!startup_properties.exists() || startup_properties.canWrite()) {
- try {
- Writer fileWriter = new FileWriter(startup_properties);
- properties.store(fileWriter, "stored by LMF startup; do not modify manually");
- fileWriter.flush();
- fileWriter.close();
- } catch (IOException e) {
- log.error("I/O error while accessing startup properties file: "+e.getMessage());
- }
- }
-
- } else {
- log.error("LMF_HOME variable was not set; could not load/save properties");
- }
- }
-
-
-
- public static final Map<String,List<InetAddress>> listHostAddresses() {
- Map<String,List<InetAddress>> result = new HashMap<String,List<InetAddress>>();
- try {
- Enumeration<NetworkInterface> ifs = NetworkInterface.getNetworkInterfaces();
- while(ifs.hasMoreElements()) {
- NetworkInterface iface = ifs.nextElement();
- if(iface.isUp() && !iface.isPointToPoint()) {
- Enumeration<InetAddress> addrs = iface.getInetAddresses();
- while(addrs.hasMoreElements()) {
- InetAddress addr = addrs.nextElement();
-
- String hostName = addr.getHostName();
-
- if(!hostName.equals(addr.getHostAddress())) {
- // only take interfaces with a proper hostname configured
-
- List<InetAddress> addresses = result.get(hostName);
- if(addresses == null) {
- addresses = new ArrayList<InetAddress>();
- result.put(hostName,addresses);
- }
- addresses.add(addr);
- }
-
- }
- }
- }
-
-
- return result;
- } catch(SocketException ex) {
- log.warn("could not determine local IP addresses, will use localhost only");
- return Collections.emptyMap();
- }
-
- }
-
-
- /**
- * Check whether the servername represents a valid network interface of this sever.
- *
- * @param serverName
- * @return
- */
- public static final boolean checkServerName(String serverName) {
- try {
- InetAddress address = InetAddress.getByName(serverName);
- return NetworkInterface.getByInetAddress(address) != null;
- } catch (UnknownHostException e) {
- return false;
- } catch (SocketException e) {
- return false;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/ProgressListener.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/ProgressListener.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/ProgressListener.java
deleted file mode 100644
index a41c252..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/ProgressListener.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.splash;
-
-import org.apache.catalina.Container;
-import org.apache.catalina.ContainerEvent;
-import org.apache.catalina.ContainerListener;
-import org.apache.catalina.Host;
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.core.StandardContext;
-import org.apache.catalina.core.StandardHost;
-import org.apache.catalina.startup.HostConfig;
-
-import java.io.File;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class ProgressListener extends SplashScreenUpdaterBase implements LifecycleListener, ContainerListener {
-
- int cur_progress = 0;
- int max_progress = 0;
-
-
-
- private StandardHost host;
-
- /**
- * Acknowledge the occurrence of the specified event.
- *
- * @param event LifecycleEvent that has occurred
- */
- @Override
- public void lifecycleEvent(LifecycleEvent event) {
- if(event.getType().equals(Lifecycle.BEFORE_INIT_EVENT)) {
-
- // register our custom context implementation
- host = (StandardHost)event.getLifecycle();
-
- for(LifecycleListener listener : host.findLifecycleListeners()) {
- if(listener instanceof HostConfig) {
- ((HostConfig)listener).setContextClass("at.newmedialab.lmf.common.LMFContext");
- }
- }
-
-
- } else if(event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
- if(event.getLifecycle() instanceof Host) {
- // register a container listener to indicate when a component has started
- log.info("starting host instance");
-
- host = (StandardHost)event.getLifecycle();
- host.addContainerListener(this);
-
- File file = new File(System.getProperty("catalina.base"),host.getAppBase());
-
- max_progress = (file.list() != null ? file.list().length : 0);
- }
- }
- }
-
- /**
- * Acknowledge the occurrence of the specified event.
- *
- * @param event ContainerEvent that has occurred
- */
- @Override
- public void containerEvent(ContainerEvent event) {
- if(event.getType().equals(Container.ADD_CHILD_EVENT)) {
- if(event.getData() instanceof StandardContext) {
- StandardContext context = (StandardContext)event.getData();
-
- cur_progress++;
-
- if(max_progress > 0) {
- showProgress(cur_progress * 100 / max_progress);
- }
-
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashContextListener.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashContextListener.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashContextListener.java
deleted file mode 100644
index 046ac8d..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashContextListener.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.splash;
-
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.core.StandardContext;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Listen to startup phases of individual contexts. Needs to be configured in server.xml
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class SplashContextListener extends SplashScreenUpdaterBase implements LifecycleListener {
-
- private static Map<String,String> appNames = new HashMap<String, String>();
- static {
- appNames.put("/LMF","Linked Media Framework");
- appNames.put("/refine", "Google Refine");
- appNames.put("/stanbol", "Apache Stanbol");
- }
-
- /**
- * Acknowledge the occurrence of the specified event.
- *
- * @param event LifecycleEvent that has occurred
- */
- @Override
- public void lifecycleEvent(LifecycleEvent event) {
- if(event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
- if(event.getLifecycle() instanceof StandardContext) {
- StandardContext context = (StandardContext)event.getLifecycle();
-
- if(appNames.get(context.getName()) != null) {
- showStatus("Starting "+appNames.get(context.getName()));
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenListener.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenListener.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenListener.java
deleted file mode 100644
index 6906c15..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenListener.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.splash;
-
-import java.awt.GraphicsEnvironment;
-import java.awt.SplashScreen;
-
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-
-/**
- * Hide the Splash screen when Tomcat has started.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class SplashScreenListener extends SplashScreenUpdaterBase implements LifecycleListener {
-
- /**
- * Acknowledge the occurrence of the specified event.
- *
- * @param event LifecycleEvent that has occurred
- */
- @Override
- public void lifecycleEvent(LifecycleEvent event) {
- if(event.getType().equals(Lifecycle.AFTER_START_EVENT)) {
- if(!GraphicsEnvironment.isHeadless()) {
- SplashScreen splashScreen = SplashScreen.getSplashScreen();
- if(splashScreen != null) {
- try {
- splashScreen.close();
- } catch (IllegalStateException e) {
-
- }
- }
- }
- } else if(event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
- if(!GraphicsEnvironment.isHeadless()) {
- showStatus("Starting Apache Tomcat ...");
- showProgress(0);
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenUpdaterBase.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenUpdaterBase.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenUpdaterBase.java
deleted file mode 100644
index 5868fd3..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/splash/SplashScreenUpdaterBase.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.splash;
-
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-import java.awt.*;
-
-/**
- * Base class for listeners updating the splash screen on application startup.
- * Offers methods for displaying text and updating a progress bar.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public abstract class SplashScreenUpdaterBase {
-
- protected static Log log = LogFactory.getLog(SplashScreenUpdaterBase.class);
-
- private static final int status_pos_x = 25;
- private static final int status_pos_y = 470;
-
- private static final int progress_bar_y = 483;
- private static final int progress_bar_height = 3;
-
- private static final Color color_background = new Color(245,244,230);
- private static final Color color_progress_bg = new Color(252,117,51);
- private static final Color color_progress_fg = Color.BLUE;
-
- protected void showStatus(String text) {
- final SplashScreen splash = SplashScreen.getSplashScreen();
- if (splash == null) {
- log.error("SplashScreen.getSplashScreen() returned null");
- return;
- }
- Graphics2D g = (Graphics2D)splash.createGraphics();
- if (g == null) {
- log.error("g is null");
- return;
- }
-
- // clear existing area
- Rectangle splashBounds = splash.getBounds();
- g.setColor(color_background);
- g.fillRect(0,status_pos_y-40,splashBounds.width,50);
-
- // draw string on splash screen
- g.setColor(Color.GRAY);
- g.setFont(new Font("ARIAL",Font.BOLD,14));
- g.drawString(text,status_pos_x,status_pos_y);
-
- splash.update();
-
- }
-
- /**
- * Update color_progress bar to show the color_progress (between 0 and 100) as provided as argument.
- *
- * @param progress
- */
- protected void showProgress(int progress) {
- final SplashScreen splash = SplashScreen.getSplashScreen();
- if (splash == null) {
- log.error("SplashScreen.getSplashScreen() returned null");
- return;
- }
- Graphics2D g = (Graphics2D)splash.createGraphics();
- if (g == null) {
- log.error("g is null");
- return;
- }
-
- // clear existing area
- Rectangle splashBounds = splash.getBounds();
- g.setColor(color_progress_bg);
- g.fillRect(0,progress_bar_y,splashBounds.width,progress_bar_height);
-
- // fill with new color_progress
- g.setColor(color_progress_fg);
- g.fillRect(0,progress_bar_y,(int)(splashBounds.width * progress / 100),progress_bar_height);
-
- splash.update();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/startup/StartupListener.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/startup/StartupListener.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/startup/StartupListener.java
deleted file mode 100644
index 8e5bbde..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/startup/StartupListener.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.startup;
-
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-import org.oxbow.swingbits.dialog.task.CommandLink;
-import org.oxbow.swingbits.dialog.task.TaskDialogs;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-import java.awt.*;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import static at.newmedialab.lmf.common.LMFStartupHelper.*;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class StartupListener implements LifecycleListener {
-
- protected static Log log = LogFactory.getLog(StartupListener.class);
-
-
- public StartupListener() {
- super();
-
-
- }
-
- /**
- * React on the AFTER_START_EVENT of Tomcat and startup the browser to point to the LMF installation. Depending
- * on the state of the LMF installation, the following actions are carried out:
- * <ul>
- * <li>in case the LMF is started for the first time, show a dialog box with options to select which IP-address to use for
- * configuring the LMF; the IP address will be stored in a separate properties file in LMF_HOME</li>
- * <li>in case the LMF has already been configured but the IP address that was used is no longer existing on the server,
- * show a warning dialog (this can happen e.g. for Laptops with dynamically changing network configurations)</li>
- * <li>otherwise, open a browser using the network address that was used previously</li>
- * </ul>
- *
- * @param event LifecycleEvent that has occurred
- */
- @Override
- public void lifecycleEvent(LifecycleEvent event) {
- if(event.getType().equals(Lifecycle.AFTER_START_EVENT)) {
- if(!GraphicsEnvironment.isHeadless()) {
-
- String serverName = null;
- int serverPort = 0;
-
- // open browser window
- if (Desktop.isDesktopSupported()) {
-
- Properties startupProperties = getStartupProperties();
- if(startupProperties.getProperty("startup.host") != null && startupProperties.getProperty("startup.port") != null) {
-
- serverName = startupProperties.getProperty("startup.host");
- serverPort = Integer.parseInt(startupProperties.getProperty("startup.port"));
-
-
- if(!checkServerName(serverName) || serverPort != getServerPort()) {
- TaskDialogs.inform(null,
- "Configured server name not found",
- "The host name ("+serverName+") that has been used to configure this \n" +
- "LMF installation is no longer available on this server. The system \n" +
- "might behave unexpectedly. Please consider using a localhost configuration \n" +
- "for systems with dynamic IP addresses!");
- }
-
-
- } else {
- // show a dialog listing all available addresses of this server and allowing the user to
- // chose
- List<CommandLink> choices = new ArrayList<CommandLink>();
-
- Map<String,List<InetAddress>> addressList = listHostAddresses();
-
- List<String> hostNames = new ArrayList<String>(addressList.keySet());
- Collections.sort(hostNames);
-
- for(String hostName : hostNames) {
- List<InetAddress> addresses = addressList.get(hostName);
- String label = hostName + " (";
- for(Iterator<InetAddress> it = addresses.iterator(); it.hasNext(); ) {
- label += it.next().getHostAddress();
- if(it.hasNext()) {
- label +=", ";
- }
- }
- label += ")";
-
- String text;
-
- if(addresses.get(0).isLoopbackAddress()) {
- text = "Local IP-Address. Recommended for Laptop use or Demonstration purposes";
- } else {
- text = "Public IP-Address. Recommended for Workstation or Server use";
- }
-
- choices.add(new CommandLink(label,text));
- }
-
- int choice = TaskDialogs.choice(null,
- "Select host address to use for configuring the LMF.",
- "For demonstration purposes or laptop installations it is recommended to select \n\"localhost\" below. For server and workstation installations, please select a \npublic IP address.", 0, choices);
-
-
- serverName = hostNames.get(choice);
- serverPort = getServerPort();
-
- startupProperties.setProperty("startup.host",serverName);
- startupProperties.setProperty("startup.port",serverPort+"");
-
- storeStartupProperties(startupProperties);
- }
-
-
- final Desktop desktop = Desktop.getDesktop();
- if(desktop.isSupported(Desktop.Action.BROWSE) && serverName != null && serverPort > 0) {
- try {
-
-
- URI uri = new URI("http",null,serverName,serverPort,"/",null,null);
- desktop.browse(uri);
-
- } catch (Exception e1) {
- System.err.println("could not open browser window, message was: "+e1.getMessage());
- }
-
- }
- }
- }
-
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4c3a7698/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/systray/SystrayListener.java
----------------------------------------------------------------------
diff --git a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/systray/SystrayListener.java b/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/systray/SystrayListener.java
deleted file mode 100644
index c3bc35d..0000000
--- a/launchers/lmf-splash/src/main/java/at/newmedialab/lmf/systray/SystrayListener.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package at.newmedialab.lmf.systray;
-
-import at.newmedialab.lmf.common.LMFContext;
-import at.newmedialab.lmf.startup.StartupListener;
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-import org.oxbow.swingbits.dialog.task.TaskDialogs;
-
-import javax.imageio.ImageIO;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.servlet.ServletContext;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import static at.newmedialab.lmf.common.LMFStartupHelper.getServerName;
-import static at.newmedialab.lmf.common.LMFStartupHelper.getServerPort;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class SystrayListener implements LifecycleListener {
-
- protected static Log log = LogFactory.getLog(SystrayListener.class);
-
- private static Set<LMFContext> contexts = new HashSet<LMFContext>();
-
- private TrayIcon icon;
-
- private Map<String, String> demoLinks;
-
- private Map<String, String> adminLinks;
-
-
-
- public static void addServletContext(LMFContext context) {
- contexts.add(context);
- }
-
-
- public SystrayListener() {
- super();
-
-
- }
-
- /**
- * Register the systray menu when the application server has successfully started.
- *
- * @param event LifecycleEvent that has occurred
- */
- @Override
- public void lifecycleEvent(LifecycleEvent event) {
- if(event.getType().equals(Lifecycle.AFTER_START_EVENT) && SystemTray.isSupported()) {
- initContextLinks();
- initSysTray();
- }
- }
-
- /**
- * Check all servlet contexts for the presence of the systray.admin and systray.demo attributes and add the link
- * definitions to the menu link maps
- */
- private void initContextLinks() {
- demoLinks = new HashMap<String, String>();
- adminLinks = new HashMap<String, String>();
-
- for(LMFContext ctx : contexts) {
- if(ctx.getServletContext() != null) {
- Object ctxAdminAttr = ctx.getServletContext().getAttribute("systray.admin");
- if(ctxAdminAttr != null && ctxAdminAttr instanceof Map) {
- Map<String,String> ctxAdminLinks = (Map<String,String>) ctxAdminAttr;
- adminLinks.putAll(ctxAdminLinks);
- }
-
- Object ctxDemoAttr = ctx.getServletContext().getAttribute("systray.demo");
- if(ctxDemoAttr != null && ctxDemoAttr instanceof Map) {
- Map<String,String> ctxDemoLinks = (Map<String,String>) ctxDemoAttr;
- demoLinks.putAll(ctxDemoLinks);
- }
- } else {
- log.error("could not register systray links because servlet context is not yet initialised");
- }
- }
- }
-
-
- private void initSysTray() {
-
- if (SystemTray.isSupported()) {
- // allow proper shutdown
- System.setProperty("org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES","false");
-
-
- SystemTray tray = SystemTray.getSystemTray();
-
- // create menu
- PopupMenu popup = new PopupMenu();
-
-
- MenuItem mainPage = createMenuItem("LMF Start Page", "http://"+getServerName()+":"+getServerPort()+"/");
- popup.add(mainPage);
-
- popup.addSeparator();
-
-
- // launch browser action
- MenuItem admin = createMenuItem("LMF Administration","http://"+getServerName()+":"+getServerPort()+"/LMF");
- popup.add(admin);
-
- // admin links
-
- for(final Map.Entry<String,String> linkEntry : adminLinks.entrySet()) {
- MenuItem entry = createMenuItem(linkEntry.getKey(),linkEntry.getValue());
- popup.add(entry);
- }
-
-
- // shutdown action
- MenuItem shutdown = new MenuItem("Shutdown");
- try {
- Class.forName("org.apache.catalina.mbeans.MBeanUtils");
- ActionListener stopListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- performServerShutdown();
- }
- };
- shutdown.addActionListener(stopListener);
- } catch (ClassNotFoundException e) {
- shutdown.setEnabled(false);
- }
- popup.add(shutdown);
-
- popup.addSeparator();
-
-
- for(final Map.Entry<String,String> linkEntry : demoLinks.entrySet()) {
- boolean containsEntry = false;
- for(int i = 0; i < popup.getItemCount(); i++) {
- MenuItem item = popup.getItem(i);
- if(item.getLabel().equals(linkEntry.getKey())) {
- containsEntry = true;
- break;
- }
- }
-
- if(!containsEntry) {
- MenuItem entry = createMenuItem(linkEntry.getKey(),linkEntry.getValue());
- popup.add(entry);
- }
- }
-
-
- popup.addSeparator();
-
- MenuItem about = new MenuItem("About");
- about.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- TaskDialogs.inform(null,
- "About Linked Media Framework",
- "LMF 2.3.1-SNAPSHOT, (c)2012 Salzburg NewMediaLab \n" +
- "Visit http://code.google.com/p/lmf/ for details");
- }
- });
- popup.add(about);
-
- MenuItem documentation = createMenuItem("Documentation", "http://code.google.com/p/lmf/wiki/TableOfContents");
- popup.add(documentation);
-
- MenuItem issues = createMenuItem("Bug Reports", "http://code.google.com/p/lmf/issues/list");
- popup.add(issues);
-
- MenuItem homepage = createMenuItem("Project Homepage", "http://code.google.com/p/lmf/");
- popup.add(homepage);
-
-
- // load icon image
- try {
- Image image = ImageIO.read(SystrayListener.class.getResource("lmf1.png"));
- icon = new TrayIcon(image,"Linked Media Framework",popup);
- icon.setImageAutoSize(true);
- tray.add(icon);
-
- } catch (IOException e) {
- log.error("SYSTRAY: could not load LMF logo for system tray",e);
- } catch (AWTException e) {
- log.error("SYSTRAY: tray icon could not be added");
- }
- }
- }
-
-
-
-
- private MenuItem createMenuItem(final String label, final String uriString) {
- MenuItem entry = new MenuItem(label);
- if (Desktop.isDesktopSupported()) {
- final Desktop desktop = Desktop.getDesktop();
- if(desktop.isSupported(Desktop.Action.BROWSE)) {
- ActionListener adminBrowserListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- try {
- URI uri = new URI(uriString);
- desktop.browse(uri);
-
- } catch (IOException e1) {
- log.error("SYSTRAY: could not access system browser, access to "+label+" disabled");
- } catch (URISyntaxException e1) {
- log.error("SYSTRAY: could not build URI to administration service, access to "+label+" disabled");
- }
-
- }
- };
- entry.addActionListener(adminBrowserListener);
-
- } else {
- entry.setEnabled(false);
- }
- } else {
- entry.setEnabled(false);
- }
- return entry;
- }
-
-
- private void performServerShutdown() {
- try{
- MBeanServer server = (MBeanServer)Class.forName("org.apache.catalina.mbeans.MBeanUtils").getMethod("createServer").invoke(null);
- ObjectName name;
- if(isTomcat6()) {
- // Tomcat 6.x
- name = new ObjectName("Catalina:type=Service,serviceName=Catalina");
- server.invoke(name, "stop", new Object[0], new String[0]);
- log.warn("shutting down Apache Tomcat server on user request");
- } else if(isTomcat7()) {
- // Tomcat 7.x
- name = new ObjectName("Catalina", "type", "Service");
- server.invoke(name, "stop", new Object[0], new String[0]);
- log.warn("shutting down Apache Tomcat server on user request");
- }
- } catch (Exception ex) {
- log.error("shutting down other servers than Apache Tomcat is not supported",ex);
- }
-
- // ensure complete shutdown
- System.exit(0);
-
- }
-
-
- /**
- * Return true if Tomcat 6.x is detected; tests for presence of class org.apache.catalina.ServerFactory
- * @return
- */
- private boolean isTomcat6() {
- try {
- Class.forName("org.apache.catalina.ServerFactory");
- return true;
- } catch (ClassNotFoundException e) {
- return false;
- }
- }
-
-
- /**
- * Return true if Tomcat 7.x is detected; tests for presence of class org.apache.catalina.CatalinaFactory
- * @return
- */
- private boolean isTomcat7() {
- try {
- Class.forName("org.apache.catalina.CatalinaFactory");
- return true;
- } catch (ClassNotFoundException e) {
- return false;
- }
- }
-
-
-}