You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by tk...@apache.org on 2013/05/16 12:31:31 UTC

[01/14] git commit: add new admin template

Updated Branches:
  refs/heads/MARMOTTA-228 [created] 5a0ba66fc


add new admin template


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/6f865b26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/6f865b26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/6f865b26

Branch: refs/heads/MARMOTTA-228
Commit: 6f865b2689693fbd7cca235360c56870ecd87003
Parents: efb2d27
Author: tkurz <tk...@apache.org>
Authored: Sun May 5 20:06:29 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Sun May 5 20:06:29 2013 +0200

----------------------------------------------------------------------
 .../src/main/resources/templates/admin.ftl         |  103 ---------------
 .../src/main/resources/templates/admin_old.ftl     |  103 +++++++++++++++
 2 files changed, 103 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/6f865b26/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index 7d8d7a1..e69de29 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -1,103 +0,0 @@
-<#--
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements. See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership. The ASF licenses this file
-    to you 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 XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
-
-<head>
-
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-    <link href="${SERVER_URL}${DEFAULT_STYLE}javadoc.css" rel="stylesheet" type="text/css" />
-    <link href="${SERVER_URL}${DEFAULT_STYLE}style.css" rel="stylesheet" type="text/css" />
-    <link href="${SERVER_URL}core/public/img/icon/lmf.ico" rel="SHORTCUT ICON">
-    <script type="text/javascript">
-        var _BASIC_URL = "${BASIC_URL}";
-        //use _SERVER_URL for webservice calls
-        var _SERVER_URL = "${SERVER_URL}";
-
-        var _CURRENT_STYLE = "${DEFAULT_STYLE}";
-
-    </script>
-    <#if USER_MODULE_IS_ACTIVE>
-        <link href="${SERVER_URL}user/admin/style/style.css" rel="stylesheet" type="text/css">
-        <script type="text/javascript" src="${SERVER_URL}user/admin/widgets/user.js"></script>
-        <script type="text/javascript">
-            window.onload = function () {
-                    LoginLogout.draw(_SERVER_URL,"login_logout");
-            }
-        </script>
-    </#if>
-
-    ${HEAD}
-
-</head>
-
-<body>
-
-<div id="wrapper">
-    <div id="header">
-        <a id="logo" href="${SERVER_URL}" title="${PROJECT}">
-            <img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
-        </a>
-        <h1>${CURRENT_MODULE} - ${CURRENT_TITLE}</h1>
-        <#if USER_MODULE_IS_ACTIVE>
-            <div id="login_logout"></div>
-        </#if>
-    </div>
-    <div class="clear"></div>
-    <div id="left">
-        <ul id="menu">
-            <#list MODULE_MENU as menu>
-            <li
-                <#if menu.properties["active"]>
-                        class="menu_item active"
-                <#else>
-                        class="menu_item"
-                </#if>
-            >
-                <div class="menu_heading"><a href="${menu.submenu[0].properties["path"]}">${menu.properties["title"]}</a></div>
-                <ul class="submenu">
-                <#list menu.submenu as submenu>
-                    <li
-                        <#if submenu.properties["active"]> class="active" </#if>
-                    >
-                    <a href="${submenu.properties["path"]}">${submenu.properties["title"]}</a>
-                    </li>
-                </#list>
-                </ul>
-            </li>
-            </#list>
-        </ul>
-    </div>
-    <div id="center">
-        <div id="content">
-        ${CONTENT}
-        </div>
-    </div>
-    <div class="clear"></div>
-    <div id="footer">
-        <div id="footer_line">
-            <span>
-                ${FOOTER}
-            </span>
-        </div>
-    </div>
-</div>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/6f865b26/platform/marmotta-core/src/main/resources/templates/admin_old.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin_old.ftl b/platform/marmotta-core/src/main/resources/templates/admin_old.ftl
new file mode 100644
index 0000000..7d8d7a1
--- /dev/null
+++ b/platform/marmotta-core/src/main/resources/templates/admin_old.ftl
@@ -0,0 +1,103 @@
+<#--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you 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 XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
+
+<head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <link href="${SERVER_URL}${DEFAULT_STYLE}javadoc.css" rel="stylesheet" type="text/css" />
+    <link href="${SERVER_URL}${DEFAULT_STYLE}style.css" rel="stylesheet" type="text/css" />
+    <link href="${SERVER_URL}core/public/img/icon/lmf.ico" rel="SHORTCUT ICON">
+    <script type="text/javascript">
+        var _BASIC_URL = "${BASIC_URL}";
+        //use _SERVER_URL for webservice calls
+        var _SERVER_URL = "${SERVER_URL}";
+
+        var _CURRENT_STYLE = "${DEFAULT_STYLE}";
+
+    </script>
+    <#if USER_MODULE_IS_ACTIVE>
+        <link href="${SERVER_URL}user/admin/style/style.css" rel="stylesheet" type="text/css">
+        <script type="text/javascript" src="${SERVER_URL}user/admin/widgets/user.js"></script>
+        <script type="text/javascript">
+            window.onload = function () {
+                    LoginLogout.draw(_SERVER_URL,"login_logout");
+            }
+        </script>
+    </#if>
+
+    ${HEAD}
+
+</head>
+
+<body>
+
+<div id="wrapper">
+    <div id="header">
+        <a id="logo" href="${SERVER_URL}" title="${PROJECT}">
+            <img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
+        </a>
+        <h1>${CURRENT_MODULE} - ${CURRENT_TITLE}</h1>
+        <#if USER_MODULE_IS_ACTIVE>
+            <div id="login_logout"></div>
+        </#if>
+    </div>
+    <div class="clear"></div>
+    <div id="left">
+        <ul id="menu">
+            <#list MODULE_MENU as menu>
+            <li
+                <#if menu.properties["active"]>
+                        class="menu_item active"
+                <#else>
+                        class="menu_item"
+                </#if>
+            >
+                <div class="menu_heading"><a href="${menu.submenu[0].properties["path"]}">${menu.properties["title"]}</a></div>
+                <ul class="submenu">
+                <#list menu.submenu as submenu>
+                    <li
+                        <#if submenu.properties["active"]> class="active" </#if>
+                    >
+                    <a href="${submenu.properties["path"]}">${submenu.properties["title"]}</a>
+                    </li>
+                </#list>
+                </ul>
+            </li>
+            </#list>
+        </ul>
+    </div>
+    <div id="center">
+        <div id="content">
+        ${CONTENT}
+        </div>
+    </div>
+    <div class="clear"></div>
+    <div id="footer">
+        <div id="footer_line">
+            <span>
+                ${FOOTER}
+            </span>
+        </div>
+    </div>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/6f865b26/platform/marmotta-core/src/main/resources/web/public/style/screen.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/style/screen.css b/platform/marmotta-core/src/main/resources/web/public/style/screen.css
new file mode 100644
index 0000000..e69de29


[02/14] git commit: first try of a boostrap template

Posted by tk...@apache.org.
first try of a boostrap template


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/924630e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/924630e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/924630e6

Branch: refs/heads/MARMOTTA-228
Commit: 924630e679ca9c0648ffc4d639523e4670078a39
Parents: 6f865b2
Author: tkurz <tk...@apache.org>
Authored: Sun May 5 20:08:15 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Sun May 5 20:08:15 2013 +0200

----------------------------------------------------------------------
 platform/marmotta-core/pom.xml                     |    7 +
 .../src/main/resources/templates/admin.ftl         |  184 +++++++++++++++
 .../web/public/img/logo/marmotta-logo-neg.png      |  Bin 0 -> 7141 bytes
 .../src/main/resources/web/public/style/screen.css |   95 ++++++++
 .../src/main/resources/web/admin/widgets/user.js   |    4 +-
 5 files changed, 289 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/924630e6/platform/marmotta-core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/pom.xml b/platform/marmotta-core/pom.xml
index 49c16f1..a7c7597 100644
--- a/platform/marmotta-core/pom.xml
+++ b/platform/marmotta-core/pom.xml
@@ -515,6 +515,13 @@
             <artifactId>kiwi-transactions</artifactId>
         </dependency>
 
+        <!-- to enable boostrap ui -->
+        <dependency>
+            <groupId>com.efsavage.twitter.bootstrap</groupId>
+            <artifactId>bootstrap-maven</artifactId>
+            <version>2.3.1</version>
+        </dependency>
+
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/924630e6/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index e69de29..14b83a5 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -0,0 +1,184 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>Aapche Marmotta</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="${SERVER_URL}core/public/img/icon/lmf.ico" rel="SHORTCUT ICON">
+
+    <!-- JS -->
+    <script type="text/javascript">
+        var _BASIC_URL = "${BASIC_URL}";
+        //use _SERVER_URL for webservice calls
+        var _SERVER_URL = "${SERVER_URL}";
+
+        var _CURRENT_STYLE = "${DEFAULT_STYLE}";
+    </script>
+
+    <!-- TODO could be nicer-->
+    <link href="${SERVER_URL}${DEFAULT_STYLE}javadoc.css" rel="stylesheet" type="text/css" />
+
+    <!-- Bootstrap -->
+    <link href="${SERVER_URL}ext/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
+    <link href="${SERVER_URL}core/public/style/screen.css" rel="stylesheet">
+
+    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
+    ${HEAD}
+</head>
+
+<body>
+
+<div class="navbar navbar-inverse navbar-fixed-top menu-level-1">
+    <div class="navbar-inner">
+        <div class="container">
+            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+            <a class="brand" href="#"></a>
+
+            <div class="nav-collapse collapse">
+                <p class="navbar-text pull-right" id="login_logout">
+                    <!--Logged in as <a href="#" class="navbar-link">Username</a>-->
+                </p>
+                <#if USER_MODULE_IS_ACTIVE>
+                    <script type="text/javascript" src="${SERVER_URL}user/admin/widgets/user.js"></script>
+                    <script type="text/javascript">
+                        window.onload = function () {
+                            LoginLogout.draw(_SERVER_URL,"login_logout");
+                        }
+                    </script>
+                </#if>
+                <!-- TODO: which links should be displayed -->
+                <ul class="nav">
+                    <li class="active"><a href="${SERVER_URL}">Home</a></li>
+                    <li><a href="#about">About</a></li>
+                    <li><a href="#contact">Contact</a></li>
+                </ul>
+            </div><!--/.nav-collapse -->
+
+        </div>
+    </div>
+</div>
+
+<div class="well sidebar-nav square-corners menu-level-2 span3 full-height">
+    <ul class="nav nav-list">
+        <li class="nav-header">$menu_container</li>
+        <#list MODULE_MENU as menu>
+                    <li
+                        <#if menu.properties["active"]> class="active" </#if>
+                    >
+                        <a href="${menu.submenu[0].properties["path"]}">
+                            <i class="icon-random"></i>  <!-- TODO icon -->
+                            <span>${menu.properties["title"]}</span>
+                        </a>
+                    </li>
+         </#list>
+    </ul>
+</div><!--/.well -->
+
+<div class="menu-level-3 row">
+    <div class="offset3 span9">
+
+        <ul class="nav nav-tabs square-corners">
+        <#list MODULE_MENU as menu>
+            <#if menu.properties["active"]>
+                <#list menu.submenu as submenu>
+                    <li
+                        <#if submenu.properties["active"]> class="active" </#if>
+                    >
+                        <a href="${submenu.properties["path"]}">${submenu.properties["title"]}</a>
+                    </li>
+                </#list>
+            </#if>
+        </#list>
+            <!--<li class="active">
+                <a href="#">Configuration</a>
+            </li>
+            <li><a href="#">Task</a></li>
+            <li><a href="#">Import</a></li>
+            <li><a href="#">Export</a></li>
+            <li><a href="#">Dataview</a></li>
+            <li><a href="#">Context</a></li>
+            <li><a href="#">Prefixes</a></li>
+            <li class="dropdown">
+                <a class="dropdown-toggle"
+                   data-toggle="dropdown"
+                   href="#">
+                    More
+                    <b class="caret"></b>
+                </a>
+                <ul class="dropdown-menu">
+                    <li><a href="#">System</a></li>
+                    <li><a href="#">Databases</a></li>
+                    <li><a href="#">Web Services</a></li>
+                </ul>
+            </li> -->
+        </ul>
+    </div>
+</div>
+
+<div id="content" class="row content">
+    <div class="offset3 span9">
+        <div class="row">
+            ${CONTENT}
+        </div>
+    </div>
+    <!--
+
+
+            <div class="span9">
+                <div class="hero-unit">
+                    <h1>Export Data</h1>
+                    <p>The following page allows you to export and download RDF data contained in the Linked Media Framework. You can choose from different serialization formats and either export all RDF data or only the RDF data contained in a certain context (named graph). If you want to download the data instead of displaying in the browser, right-click the download link and choose "save as".</p>
+                </div>
+            </div>
+
+            <div class="span4">
+                <div class="hero-unit">
+                    <form>
+                        <fieldset>
+                            <legend>Legend</legend>
+                            <div class="field-box">
+                                <label>Format</label>
+                                <select>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                </select>
+                            </div>
+                            <div class="field-box">
+                                <label>Context</label>
+                                <select>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                    <option>Application ld+json</option>
+                                </select>
+                            </div>
+                            <div class="field-box">
+                                <label></label>
+                                <button type="submit" class="btn btn-primary btn-large">Download</button>
+                            </div>
+                        </fieldset>
+                    </form>
+                </div>
+            </div>
+
+        </div>  -->
+    </div>
+
+        <!-- ?FOOTER? -->
+</body>
+
+<!-- Le javascript
+================================================== -->
+<!-- Placed at the end of the document so the pages load faster -->
+<script src="${SERVER_URL}core/public/js/lib/jquery-1.7.2.js"></script>
+<script src="${SERVER_URL}ext/bootstrap/js/bootstrap.js"></script>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/924630e6/platform/marmotta-core/src/main/resources/web/public/img/logo/marmotta-logo-neg.png
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/img/logo/marmotta-logo-neg.png b/platform/marmotta-core/src/main/resources/web/public/img/logo/marmotta-logo-neg.png
new file mode 100644
index 0000000..6a442b0
Binary files /dev/null and b/platform/marmotta-core/src/main/resources/web/public/img/logo/marmotta-logo-neg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/924630e6/platform/marmotta-core/src/main/resources/web/public/style/screen.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/style/screen.css b/platform/marmotta-core/src/main/resources/web/public/style/screen.css
index e69de29..003bf05 100644
--- a/platform/marmotta-core/src/main/resources/web/public/style/screen.css
+++ b/platform/marmotta-core/src/main/resources/web/public/style/screen.css
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+/* Welcome to Compass.
+ * In this file you should write your main styles. (or centralize your imports)
+ * Import this file using the following HTML or equivalent:
+ * <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
+/* line 10, ../sass/screen.scss */
+body, html {
+    height: 100%;
+}
+
+/* line 14, ../sass/screen.scss */
+body {
+    padding-top: 40px;
+}
+/* line 18, ../sass/screen.scss */
+body .menu-level-1.navbar .navbar-inner .container {
+    margin-left: 0px;
+}
+/* line 21, ../sass/screen.scss */
+body .menu-level-1.navbar .navbar-inner .container .brand {
+    background-image: url(../img/logo/marmotta-logo-neg.png);
+    height: 40px;
+    width: 120px;
+    background-size: contain;
+    margin-left: 12px;
+    padding: 0;
+    background-repeat: no-repeat;
+}
+/* line 33, ../sass/screen.scss */
+body .menu-level-2, body .menu-level-3 {
+    position: fixed;
+}
+/* line 37, ../sass/screen.scss */
+body .menu-level-2 {
+    z-index: 1020;
+    margin-left: -20px;
+    padding-right: 0px;
+}
+/* line 43, ../sass/screen.scss */
+body .menu-level-3 {
+    z-index: 1010;
+    width: 100%;
+    margin-left: -40px;
+}
+/* line 48, ../sass/screen.scss */
+body .menu-level-3 div {
+    width: 100%;
+}
+/* line 51, ../sass/screen.scss */
+body .menu-level-3 div > ul {
+    width: 100%;
+    padding-left: 20px;
+    background: white;
+}
+/* line 59, ../sass/screen.scss */
+body .row.content {
+    margin-top: 58px;
+}
+/* line 63, ../sass/screen.scss */
+body .square-corners {
+    -webkit-border-radius: 0px;
+    -moz-border-radius: 0px;
+    -ms-border-radius: 0px;
+    -o-border-radius: 0px;
+    border-radius: 0px;
+}
+/* line 67, ../sass/screen.scss */
+body .full-height {
+    height: 100%;
+}
+/* line 71, ../sass/screen.scss */
+body .nav-tabs.square-corners > li > a {
+    -webkit-border-radius: 0px;
+    -moz-border-radius: 0px;
+    -ms-border-radius: 0px;
+    -o-border-radius: 0px;
+    border-radius: 0px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/924630e6/platform/marmotta-user/src/main/resources/web/admin/widgets/user.js
----------------------------------------------------------------------
diff --git a/platform/marmotta-user/src/main/resources/web/admin/widgets/user.js b/platform/marmotta-user/src/main/resources/web/admin/widgets/user.js
index c816177..06986bd 100644
--- a/platform/marmotta-user/src/main/resources/web/admin/widgets/user.js
+++ b/platform/marmotta-user/src/main/resources/web/admin/widgets/user.js
@@ -43,6 +43,7 @@ var LoginLogout = {
 
         if(user.login=="anonymous") {
             var login_link = document.createElement("a");
+            login_link.setAttribute("class",'navbar-link');
             login_link.innerHTML = "login";
             login_link.onclick = function() {
                 call(basic_url+"user/login");
@@ -51,13 +52,14 @@ var LoginLogout = {
         } else {
             //logout button
             var logout_link = document.createElement("a");
+            logout_link.setAttribute("class",'navbar-link');
             logout_link.innerHTML = "change user";
             logout_link.onclick = function() {
                 call(basic_url+"user/login?logout=true");
             };
 
             document.getElementById(container).innerHTML =
-                "<span><a href='"+basic_url+"user/me.html'>"+user.login+"</a></span>&nbsp;|&nbsp;";
+                "<span><a class='navbar-link' href='"+basic_url+"user/me.html'>"+user.login+"</a></span>&nbsp;|&nbsp;";
             document.getElementById(container).appendChild(logout_link);
         }
     }


[07/14] git commit: MARMOTTA-233: extends module configuration, a first running version

Posted by tk...@apache.org.
MARMOTTA-233: extends module configuration,
a first running version


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/81503abb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/81503abb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/81503abb

Branch: refs/heads/MARMOTTA-228
Commit: 81503abb7f12f9c967a568950e0a086e1d28cb06
Parents: 1a351ed
Author: tkurz <tk...@apache.org>
Authored: Fri May 10 18:52:24 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Fri May 10 18:52:24 2013 +0200

----------------------------------------------------------------------
 .../core/api/templating/AdminInterfaceService.java |    3 +-
 .../platform/core/model/template/MenuItem.java     |   73 ++++++++-------
 .../core/services/modules/ModuleServiceImpl.java   |    4 +-
 .../templating/AdminTemplatingServiceImpl.java     |   22 +++--
 .../src/main/resources/config-defaults.properties  |    2 +-
 .../src/main/resources/templates/admin.ftl         |   38 +++-----
 6 files changed, 72 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
index 5ec3a6c..cf4e7ff 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
@@ -29,7 +29,8 @@ import javax.servlet.ServletContext;
 public interface AdminInterfaceService {
     
     public final static String PATH = "/templates/";
-    public final static String DEFAULT_REST_PATH = "doc/rest/";
+    public final static String DEFAULT_REST_PATH = "/doc/rest/";
+    public final static String DEFAULT_REST_FILE = "overview-index.html";
     public final static String DEFAULT_MENU_ICON = "icon-asterisk";
     public final static String DEFAULT_WEBSERVICE_TITLE = "Webservice";
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
index fd8dfe9..ee5b204 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
@@ -36,68 +36,75 @@ import static org.apache.marmotta.platform.core.model.template.MenuItemType.*;
  */
 public class MenuItem {
 
-    private boolean active;
-    private String label;
-    private String path;
-    private MenuItemType type;
+    private boolean initialized = false;
+
+    private HashMap<String,Object> properties;
     private List<MenuItem> items;
-    private String icon;
+    private MenuItemType type;
 
     public MenuItem(String label, MenuItemType type) {
+        this.properties = new HashMap<String, Object>();
         this.type = type;
-        this.label = label;
         this.items = new ArrayList<MenuItem>();
-        this.active = false;
-        this.icon = AdminInterfaceService.DEFAULT_MENU_ICON;
-    }
-
-    public String getIcon() {
-        return icon;
-    }
 
-    public void setIcon(String icon) {
-        this.icon = icon;
+        properties.put("items",items);
+        properties.put("label",label);
+        properties.put("isActive",false);
+        properties.put("icon",AdminInterfaceService.DEFAULT_MENU_ICON);
     }
 
-    public String getLabel() {
-        return label;
-    }
-
-    public String getPath() {
-        return path;
+    public HashMap<String,Object> getProperties() {
+        if(properties.get("items") != null) {
+            List<Object> os = new ArrayList<Object>();
+            for(MenuItem item : items) {
+                os.add(item.getProperties());
+            }
+            properties.put("items",os);
+        }
+        return properties;
     }
 
-    public void setPath(String path) {
-        this.path = path;
+    public void set(String name, Object value) {
+        properties.put(name,value);
     }
 
-    public List<MenuItem> getItems() {
-        return this.items;
+    public Object get(String name) {
+        return properties.get(name);
     }
 
     public void addItem(MenuItem item) {
-        this.addItem(item);
+        items.add(item);
     }
 
     public boolean setActive(String path) {
+        boolean isActive = false;
         switch(type) {
             case ROOT:
             case CONTAINER:
             case MODULE:
                 for(MenuItem item : items) {
                     if(item.setActive(path)) {
-                        active = true;
-                    } else {
-                        active = false;
+                        isActive = true;
                     }
                 }
-                return active;
+                break;
             case PAGE:
-                return active = this.path.equals(path);
+                isActive  = get("path").equals(path);
+                break;
             case WEBSERVICE:
-                return active = path.contains(AdminInterfaceService.DEFAULT_REST_PATH);
+                String s = (String)properties.get("path");
+                isActive = (
+                        path.startsWith(s.substring(0,s.lastIndexOf("/"))) &&
+                        path.contains(AdminInterfaceService.DEFAULT_REST_PATH));
+                break;
             default:
-                return false;
+                isActive = false;
         }
+        set("isActive",isActive);
+        return isActive;
+    }
+
+    public boolean isEmpty() {
+        return items.isEmpty();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index 4864fe1..8e4c9ab 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -389,7 +389,7 @@ public class ModuleServiceImpl implements ModuleService {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();
         if(config != null) {
             ArrayList<HashMap<String,String>> l = new ArrayList<HashMap<String,String>>();
-            if(!config.subset("adminpage.").isEmpty()) {
+            if(!config.subset("adminpage").isEmpty()) {
                 while(config.getString("adminpage."+l.size()+".link") != null) {
                     HashMap<String,String> map = new HashMap<String, String>();
                     map.put("link",config.getString("baseurl")+config.getString("adminpage."+l.size()+".link"));
@@ -400,7 +400,7 @@ public class ModuleServiceImpl implements ModuleService {
                 for(String path : config.getStringArray("adminpages")) {
                     HashMap<String,String> map = new HashMap<String, String>();
                     map.put("link",config.getString("baseurl")+path);
-                    map.put("title",path.substring(path.lastIndexOf("/"),path.lastIndexOf(".")).replaceAll("_"," "));
+                    map.put("title",path.substring(path.lastIndexOf("/")+1,path.lastIndexOf(".")).replaceAll("_"," "));
                     l.add(map);
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
index 247a0b4..7cc816e 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
@@ -71,7 +71,7 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
      */
     @Override
     public void init(ServletContext context) throws TemplatingException {
-    	buildMenu();
+    	menu = buildMenu();
         this.context = context;
         try {
         	 //try-run to check it from the very beginning
@@ -92,9 +92,11 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
 
         if(!configurationService.getBooleanConfiguration("templating.cache.enabled",true) && context!=null) {
             init(context);
-            menu.setActive(path);
         }
 
+        //set active
+        menu.setActive(path);
+
         //fill data model
         Map<String, Object> datamodel = new HashMap<String,Object>();
     	for(Properties p : Properties.values()) {
@@ -105,7 +107,7 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
         //end hack!!!
 
         //add menu
-        datamodel.put("MENU",menu);
+        datamodel.put("MENU",menu.getProperties());
         try {
             String s = new String(bytes);
             Matcher m = PATTERN.matcher(s);
@@ -147,24 +149,26 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
             //add modules
             for(String module_string : moduleService.listSortedModules(container_string)) {
                 MenuItem module = new MenuItem(module_string, MenuItemType.MODULE);
-                module.setPath(moduleService.getModuleWeb(module_string));
-                module.setIcon(moduleService.getIcon(module_string));
+                module.set("path",moduleService.getModuleWeb(module_string));
+                if(moduleService.getIcon(module_string) != null)
+                    module.set("icon",moduleService.getIcon(module_string));
 
                 //add pages
                 for(HashMap<String,String> page_object : moduleService.getAdminPageObjects(module_string)) {
                     MenuItem page = new MenuItem(page_object.get("title"), MenuItemType.PAGE);
-                    page.setPath(page_object.get("path"));
+                    page.set("path",page_object.get("link"));
                     module.addItem(page);
                 }
 
                 //add webservice
                 if(!moduleService.getWebservices(module_string).isEmpty()) {
-                    MenuItem page = new MenuItem(DEFAULT_WEBSERVICE_TITLE, MenuItemType.MODULE);
-                    page.setPath(module.getPath()+DEFAULT_REST_PATH);
+                    MenuItem page = new MenuItem(DEFAULT_WEBSERVICE_TITLE, MenuItemType.WEBSERVICE);
+                    page.set("path",module.get("path")+DEFAULT_REST_PATH+DEFAULT_REST_FILE);
+                    module.addItem(page);
                 }
 
                 //add if there are pages to display
-                if(!module.getItems().isEmpty()) container.addItem(module);
+                if(!module.isEmpty()) container.addItem(module);
             }
             menu.addItem(container);
         }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties
index 8d70256..4520300 100644
--- a/platform/marmotta-core/src/main/resources/config-defaults.properties
+++ b/platform/marmotta-core/src/main/resources/config-defaults.properties
@@ -93,7 +93,7 @@ linkeddata.mime.rel.default = meta
 templating.sort_by_weight = true
 
 # recache templating file every time
-templating.cache.enabled = true
+templating.cache.enabled = false
 
 
 ###############################################################################

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/81503abb/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index fa0e2ed..e524a05 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -64,19 +64,17 @@
 
 <div class="well sidebar-nav square-corners menu-level-2 span3 full-height">
     <ul class="nav nav-list">
-        <#list MENU as menu>
-        <li class="nav-header">${menu["label"]}</li>
-        <#list menu.modules as submenu>
+        <#list MENU["items"] as menu>
+        <li class="nav-header">${menu.label}</li>
+        <#list menu["items"] as submenu>
             <li
-                <#if submenu["active"]> class="active" </#if>
+                <#if submenu["isActive"]> class="active" </#if>
                     >
-                <a href="${SERVER_URL}${submenu["path"]}
-                <#if submenu["pages"]??>
-                    ${submenu["pages"][0]["link"]}"
+                <#if submenu["items"]?has_content>
+                        <a href="${SERVER_URL}${submenu["items"][0]["path"]?substring(1)}">
                 <#else>
-                        doc/rest/index.html"
+                        <a href="${SERVER_URL}doc/rest/index.html">
                 </#if>
-                >
                     <i class="${submenu["icon"]}"></i>  <!-- TODO icon -->
                     <span>${submenu["label"]}</span>
                 </a>
@@ -90,25 +88,17 @@
     <div class="offset3 span9">
 
         <ul class="nav nav-tabs square-corners">
-        <#list MENU as menu>
-            <#if menu["active"]>
-                <#list menu["modules"] as submenu>
-                    <#if submenu["active"]>
-                        <#list submenu["pages"] as pages>
+        <#list MENU["items"] as menu>
+            <#if menu["isActive"]>
+                <#list menu["items"] as submenu>
+                    <#if submenu["isActive"]>
+                        <#list submenu["items"] as pages>
                                 <li
-                                <#if pages["active"]> class="active" </#if>
+                                <#if pages["isActive"]> class="active" </#if>
                                 >
-                                    <a href="${SERVER_URL}${submenu["path"]}${pages["link"]}">${pages["label"]}</a>
+                                    <a href="${SERVER_URL}${pages["path"]?substring(1)}">${pages["label"]}</a>
                                 </li>
                         </#list>
-                        <#if submenu["webservice"]>
-                            <li
-                            <#if submenu["webservice_active"]> class="active" </#if>
-                            >
-                                <a href="${SERVER_URL}${submenu["path"]}doc/rest/index.html">webservice</a>
-                            </li>
-
-                        </#if>
                     </#if>
                 </#list>
             </#if>


[09/14] git commit: refactor ordering

Posted by tk...@apache.org.
refactor ordering


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/49d098fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/49d098fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/49d098fd

Branch: refs/heads/MARMOTTA-228
Commit: 49d098fdc1700e9f8d971ee3b8c8b7dc326baade
Parents: 99af886
Author: tkurz <tk...@apache.org>
Authored: Mon May 13 15:45:07 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 13 15:45:07 2013 +0200

----------------------------------------------------------------------
 .../core/services/modules/ModuleServiceImpl.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/49d098fd/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index 8e4c9ab..0170e0c 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -263,7 +263,7 @@ public class ModuleServiceImpl implements ModuleService {
         Collections.sort(sorted,new Comparator<String>() {
             @Override
             public int compare(String o, String o2) {
-                return ((Integer)container_weight.get(o)).compareTo(container_weight.get(o2));
+                return ((Integer)container_weight.get(o2)).compareTo(container_weight.get(o));
             }
         });
         return sorted;


[13/14] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta into MARMOTTA-228

Posted by tk...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta into MARMOTTA-228


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/f83e310b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/f83e310b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/f83e310b

Branch: refs/heads/MARMOTTA-228
Commit: f83e310b48e24ae148548c5ff5f81409e21f540e
Parents: 10aff5e adff465
Author: tkurz <tk...@apache.org>
Authored: Thu May 16 12:29:14 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Thu May 16 12:29:14 2013 +0200

----------------------------------------------------------------------
 .../sparql/persistence/KiWiSparqlConnection.java   |    1 +
 .../marmotta/ldcache/api/LDCachingBackend.java     |    8 ++
 .../ldcache/backend/file/LDCachingFileBackend.java |   14 +++
 .../backend/file/test/LDCacheBackendTest.java      |    6 +
 .../ldcache/backend/kiwi/LDCachingKiWiBackend.java |   21 ++++
 .../backend/kiwi/test/LDCacheBackendTest.java      |    6 +
 .../apache/marmotta/ldcache/services/LDCache.java  |   12 +++
 .../provider/mediawiki/MediawikiProvider.java      |    2 +-
 libraries/ldpath/ldpath-backend-sesame/pom.xml     |    6 -
 .../core/api/config/ConfigurationService.java      |    3 +
 .../services/config/ConfigurationServiceImpl.java  |   19 ++++-
 .../core/startup/MarmottaStartupService.java       |    2 +
 .../model/filter/MarmottaNotCachedFilter.java      |   75 +++++++++++++++
 13 files changed, 166 insertions(+), 9 deletions(-)
----------------------------------------------------------------------



[03/14] git commit: MARMOTTA-233: extends module configuration

Posted by tk...@apache.org.
MARMOTTA-233: extends module configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/80345190
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/80345190
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/80345190

Branch: refs/heads/MARMOTTA-228
Commit: 8034519030d8568bec53e31ff7caf888affb6748
Parents: 924630e
Author: tkurz <tk...@apache.org>
Authored: Mon May 6 12:34:03 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 6 12:34:03 2013 +0200

----------------------------------------------------------------------
 .../platform/core/api/modules/ModuleService.java   |   24 ++++
 .../platform/core/services/modules/AdminPage.java  |  101 ++++++++++++++
 .../core/services/modules/AdminPageContainer.java  |   56 ++++++++
 .../core/services/modules/ModuleServiceImpl.java   |  106 ++++++++++++++-
 .../src/main/resources/config-defaults.properties  |    6 +
 .../main/resources/config-descriptions.properties  |    6 +
 .../src/main/resources/kiwi-module.properties      |   44 +++++--
 .../src/main/resources/templates/admin.ftl         |    2 +-
 8 files changed, 327 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
index 0739abe..b099921 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
@@ -17,7 +17,10 @@
  */
 package org.apache.marmotta.platform.core.api.modules;
 
+import org.apache.commons.configuration.Configuration;
 import org.apache.marmotta.platform.core.model.module.ModuleConfiguration;
+import org.apache.marmotta.platform.core.services.modules.AdminPage;
+import org.apache.marmotta.platform.core.services.modules.AdminPageContainer;
 
 import javax.enterprise.inject.spi.InjectionPoint;
 import java.net.URL;
@@ -111,6 +114,7 @@ public interface ModuleService {
      * @param moduleName
      * @return
      */
+    @Deprecated
     public List<String> getAdminPages(String moduleName);
 
     /**
@@ -129,4 +133,24 @@ public interface ModuleService {
      */
     public int getWeight(String moduleName);
 
+    /**
+     * returns the icon (if set), null otherwise
+     * @param moduleName
+     * @return
+     */
+    public String getIcon(String moduleName);
+
+    /**
+     * Returns a list of AdminPage Objects
+     * @param moduleName
+     * @return
+     */
+    public List<AdminPage> getAdminPageList(String moduleName);
+
+    /**
+     * Lists containers and underlying modules
+     * @return
+     */
+    public List<AdminPageContainer> listContainers();
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
new file mode 100644
index 0000000..4ab3295
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.marmotta.platform.core.services.modules;
+
+import org.apache.marmotta.platform.core.exception.MarmottaException;
+import org.apache.marmotta.platform.core.exception.TemplatingException;
+
+import java.util.List;
+
+/**
+ * This class is used for more complex AdminPage information (e.g. for Templating).
+ * <p/>
+ * Author: Thomas Kurz (tkurz@apache.org)
+ */
+public class AdminPage implements Comparable<AdminPage> {
+
+    private String name;
+    private String path;
+    private boolean important = false;
+    private int number = 0;
+
+    /**
+     * create AdminPage object
+     * @param number for sorting
+     * @param path path to page
+     * @param name name (e.g. in the menu display)
+     * @param important if true, the page can appear in a 'special link' section
+     * @throws MarmottaException
+     */
+    AdminPage(int number, String path, String name, boolean important) throws MarmottaException {
+        if(path==null) throw new MarmottaException("path for admin page must be defined");
+        this.path = path;
+
+        if(name != null) this.name = name;
+        else this.name = getNameFromPath(path);
+
+        this.important = important;
+    }
+
+    /**
+     * Creates and AdminPage just from path
+     * @param path
+     */
+    AdminPage(String path) {
+        this.path= path;
+        this.name = getNameFromPath(path);
+    }
+
+    /**
+     * returns a 'useful' name from path
+     * @param path
+     * @return
+     */
+    private String getNameFromPath(String path) {
+        return path.substring(path.lastIndexOf("/")).replaceAll("/"," ").replaceAll("_"," ").replaceAll(".html","").replaceAll(".jsp","");
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    /**
+     * if numbers are used, the sorting is based on numbers, otherwise on alphabetical order of names
+     * @param adminPage
+     * @return
+     */
+    @Override
+    public int compareTo(AdminPage adminPage) {
+        if(number != adminPage.number) {
+            return name.compareTo(adminPage.name);
+        } else return ((Integer)number).compareTo(adminPage.number);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
new file mode 100644
index 0000000..438707b
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.marmotta.platform.core.services.modules;
+
+import java.util.List;
+
+/**
+ * ...
+ * <p/>
+ * Author: Thomas Kurz (tkurz@apache.org)
+ */
+public class AdminPageContainer implements Comparable<AdminPageContainer> {
+
+    private int number = 0;
+    private String name;
+    private List<String> modules;
+
+    public AdminPageContainer(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public int compareTo(AdminPageContainer adminPageContainer) {
+        if(number != adminPageContainer.number) return ((Integer)number).compareTo(adminPageContainer.number);
+        return name.compareTo(adminPageContainer.name);
+    }
+
+    public boolean equals(String s) {
+        return name.equals(s);
+    }
+
+    public void addModule(String module) {
+        modules.add(module);
+    }
+
+    public void setNumber(int number) {
+        this.number = number;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index b7e4d63..9dbfca9 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -18,7 +18,9 @@
 package org.apache.marmotta.platform.core.services.modules;
 
 import com.google.common.collect.ImmutableList;
+import org.apache.marmotta.platform.core.api.config.ConfigurationService;
 import org.apache.marmotta.platform.core.api.modules.ModuleService;
+import org.apache.marmotta.platform.core.exception.MarmottaException;
 import org.apache.marmotta.platform.core.model.module.ModuleConfiguration;
 import org.apache.commons.configuration.CompositeConfiguration;
 import org.apache.commons.configuration.Configuration;
@@ -32,18 +34,13 @@ import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
 import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Inject;
 import java.io.IOException;
 import java.net.JarURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 /**
  * Add file description here!
@@ -53,16 +50,29 @@ import java.util.Set;
 @ApplicationScoped
 public class ModuleServiceImpl implements ModuleService {
 
+    private String default_container_name = "Others";
+    private int default_container_number = 100;
+
     private Logger log = LoggerFactory.getLogger(ModuleServiceImpl.class);
 
     private Set<String> modules;
 
+    private List<AdminPageContainer> containers;
+
     private Map<String,Configuration> configurationMap;
     private Map<String, Configuration> jarURLs;
 
+    @Inject
+    ConfigurationService configurationService;
+
     @PostConstruct
     public void initialize() {
+
+        default_container_name = configurationService.getStringConfiguration("kiwi.pages.default_container.name",default_container_name);
+        default_container_number = configurationService.getIntConfiguration("kiwi.pages.default_container.number",default_container_number);
+
         modules = new HashSet<String>();
+        containers = new ArrayList<AdminPageContainer>();
         configurationMap = new HashMap<String, Configuration>();
         jarURLs = new HashMap<String, Configuration>();
 
@@ -84,6 +94,14 @@ public class ModuleServiceImpl implements ModuleService {
                     modules.add(moduleName);
 
 
+
+                    if(moduleProperties.getString("container") != null) {
+                        addContainerModule(moduleProperties.getString("container"),moduleName,moduleProperties.getInt("container.weight",-1));
+                    } else {
+                        addContainerModule(default_container_name,moduleName,default_container_number);
+                    }
+
+
                     URLConnection urlConnection = moduleUrl.openConnection();
                     URL jarUrl;
                     if(urlConnection instanceof JarURLConnection) {
@@ -135,6 +153,21 @@ public class ModuleServiceImpl implements ModuleService {
         }
     }
 
+    private void addContainerModule(String container, String module, int number) {
+        AdminPageContainer c;
+        int i = containers.indexOf(container);
+        if(i>=0) {
+            c = containers.get(i);
+            c.addModule(module);
+        }
+        else {
+            c = new AdminPageContainer(container);
+            containers.add(c);
+            c.addModule(module);
+        }
+        if(number>0) c.setNumber(number);
+    }
+
     /**
      * Provide the current module configuration to the service injecting it
      *
@@ -173,6 +206,7 @@ public class ModuleServiceImpl implements ModuleService {
      * @param moduleName
      * @return
      */
+    @Deprecated
     @Override
     public Collection<String> getEntities(String moduleName) {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();
@@ -192,6 +226,14 @@ public class ModuleServiceImpl implements ModuleService {
     }
 
     /**
+     * Lists containers and underlying modules
+     * @return
+     */
+    public List<AdminPageContainer> listContainers() {
+        return containers;
+    }
+
+    /**
      * Return the configuration for the module identified by the name given as argument. Returns an
      * immutable Apache Commons Configuration object, or null if the module is not found.
      *
@@ -269,11 +311,25 @@ public class ModuleServiceImpl implements ModuleService {
     }
 
     /**
+     * returns the icon (if set), null otherwise
+     * @param moduleName
+     * @return
+     */
+    @Override
+    public String getIcon(String moduleName) {
+        Configuration config = getModuleConfiguration(moduleName).getConfiguration();
+        if(config != null) return config.getString("icon");
+        else
+            return null;
+    }
+
+    /**
      * Return a list of admin pages (paths)
      * @param moduleName
      * @return
      */
     @Override
+    @Deprecated
     public List<String> getAdminPages(String moduleName) {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();
         if(config != null) return ImmutableList.copyOf(config.getStringArray("adminpages"));
@@ -281,6 +337,42 @@ public class ModuleServiceImpl implements ModuleService {
             return null;
     }
 
+    /**
+     * Returns a list of AdminPage Objects
+     * @param moduleName
+     * @return
+     */
+    @Override
+    public List<AdminPage> getAdminPageList(String moduleName) {
+        ArrayList<AdminPage> l = new ArrayList<AdminPage>();
+        Configuration config = getModuleConfiguration(moduleName).getConfiguration();
+
+        if(config==null) return null;
+
+        //test if there are names and order for admin pages
+        if(config.getString("adminpages.0") != null) {
+            int i=0;
+            while(config.getString("adminpages."+i) != null) {
+                try {
+                    l.add(new AdminPage(
+                            i,
+                            config.getString("adminpages." + i + ".path", null),
+                            config.getString("adminpages."+i+".title",null),
+                            config.getBoolean("adminpages."+i+".important",false)
+                    ));
+                } catch (MarmottaException e) {
+                    log.error("admin page cannot be added for module "+moduleName);
+                }
+            }
+        } else {
+            for(String path : getAdminPages(moduleName)) {
+                l.add(new AdminPage(path));
+            }
+        }
+        Collections.sort(l);
+        return l;
+    }
+
     @Override
     public int getWeight(String moduleName) {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties
index 6a5dcc8..32911a2 100644
--- a/platform/marmotta-core/src/main/resources/config-defaults.properties
+++ b/platform/marmotta-core/src/main/resources/config-defaults.properties
@@ -62,6 +62,12 @@ kiwi.pages.project.custom.footer = Your Footer powered by <a href="http://marmot
 # supported styles
 kiwi.pages.style_path = core/public/style/blue/
 
+# name for default container
+kiwi.pages.default_container.name = Others
+
+# ordering number for default container
+kiwi.pages.default_container.number = 100
+
 # enable or disable the logging of debugging messages for the whole system
 debug.enabled = false
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/resources/config-descriptions.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-descriptions.properties b/platform/marmotta-core/src/main/resources/config-descriptions.properties
index 913ba5b..607e1d6 100644
--- a/platform/marmotta-core/src/main/resources/config-descriptions.properties
+++ b/platform/marmotta-core/src/main/resources/config-descriptions.properties
@@ -50,6 +50,12 @@ kiwi.pages.project.type = java.lang.Enum("marmotta"|"custom")
 kiwi.pages.style_path.description = path to stylesheets for LMF Admin page
 kiwi.pages.style.type = java.lang.String
 
+kiwi.pages.default_container.name.description = name for default container
+kiwi.pages.default_container.name.type = java.lang.String
+
+kiwi.pages.default_container.number.description = ordering number for default container
+kiwi.pages.default_container.number.type = java.lang.String
+
 debug.enabled.description = enable or disable the logging of debugging messages for the whole system
 debug.enabled.type = java.lang.Boolean
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/kiwi-module.properties b/platform/marmotta-core/src/main/resources/kiwi-module.properties
index 30703e7..adce8f8 100644
--- a/platform/marmotta-core/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-core/src/main/resources/kiwi-module.properties
@@ -18,6 +18,11 @@
 
 name=Core Services
 
+icon=icon-beaker
+
+container=My Core Container
+container.weight = 10
+
 subtitle = Configure LMF Core
 weight = 10
 
@@ -26,16 +31,35 @@ icon_small = /admin/img/config_small.png
 #do not change!!!
 baseurl=/core
 
-adminpages=/admin/about.html,\
-  /admin/configuration.html,\
-  /admin/tasks.html,\
-  /admin/import.html,\
-  /admin/export.html,\
-  /admin/dataview.html,\
-  /admin/contexts.html,\
-  /admin/prefixes.html,\
-  /admin/system.html,\
-  /admin/database.html,
+adminpages.0.title=About
+adminpages.0.link=/admin/about.html
+
+adminpages.1.title=Core Configuration
+adminpages.1.link=/admin/configuration.html
+
+adminpages.2.title=Tasks
+adminpages.2.link=/admin/tasks.html
+
+adminpages.3.title=Import
+adminpages.3.link=/admin/import.html
+
+adminpages.4.title=Export
+adminpages.4.link=/admin/export.html
+
+adminpages.5.title=Data Views
+adminpages.5.link=/admin/dataview.html
+
+adminpages.6.title=Context Manager
+adminpages.6.link=/admin/contexts.html
+
+adminpages.7.title=Prefix Manager
+adminpages.7.link=/admin/prefixes.html
+
+adminpages.8.title=System
+adminpages.8.link=/admin/system.html
+
+adminpages.9.title=Database
+adminpages.9.link=/admin/database.html
 
 webservices=org.apache.marmotta.platform.core.webservices.config.ConfigurationWebService,\
   org.apache.marmotta.platform.core.webservices.config.DependenciesWebService,\

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80345190/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index 14b83a5..370c415 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -138,7 +138,7 @@
             <div class="span4">
                 <div class="hero-unit">
                     <form>
-                        <fieldset>
+                    <fieldset>
                             <legend>Legend</legend>
                             <div class="field-box">
                                 <label>Format</label>


[14/14] git commit: bugfix for nullpointer exception

Posted by tk...@apache.org.
bugfix for nullpointer exception


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/5a0ba66f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/5a0ba66f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/5a0ba66f

Branch: refs/heads/MARMOTTA-228
Commit: 5a0ba66fc784dd4f71efe5673a1ce61dbf3d7eff
Parents: f83e310
Author: tkurz <tk...@apache.org>
Authored: Thu May 16 12:29:58 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Thu May 16 12:29:58 2013 +0200

----------------------------------------------------------------------
 .../core/services/modules/ModuleServiceImpl.java   |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5a0ba66f/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index 40df1c4..a3cfb15 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -399,7 +399,12 @@ public class ModuleServiceImpl implements ModuleService {
                 for(String path : config.getStringArray("adminpages")) {
                     HashMap<String,String> map = new HashMap<String, String>();
                     map.put("link",config.getString("baseurl")+path);
-                    map.put("title",path.substring(path.lastIndexOf("/")+1,path.lastIndexOf(".")).replaceAll("_"," "));
+                    String title;
+                    if(path.lastIndexOf(".") > path.lastIndexOf("/")+1)
+                        title = path.substring(path.lastIndexOf("/")+1,path.lastIndexOf(".")).replaceAll("_"," ");
+                    else
+                        title = path.substring(path.lastIndexOf("/")+1);
+                    map.put("title",title);
                     l.add(map);
                 }
             }


[12/14] git commit: cosmetic

Posted by tk...@apache.org.
cosmetic


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/10aff5ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/10aff5ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/10aff5ef

Branch: refs/heads/MARMOTTA-228
Commit: 10aff5efa9143420b7a9645484d93cc410514cf1
Parents: ffa3de0
Author: tkurz <tk...@apache.org>
Authored: Mon May 13 16:00:56 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 13 16:00:56 2013 +0200

----------------------------------------------------------------------
 .../core/services/modules/ModuleServiceImpl.java   |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/10aff5ef/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index 0170e0c..40df1c4 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -48,7 +48,6 @@ import java.util.*;
 public class ModuleServiceImpl implements ModuleService {
 
     private String default_container_name = "Others";
-    //private int default_container_number = 100;
 
     private Logger log = LoggerFactory.getLogger(ModuleServiceImpl.class);
 
@@ -263,7 +262,7 @@ public class ModuleServiceImpl implements ModuleService {
         Collections.sort(sorted,new Comparator<String>() {
             @Override
             public int compare(String o, String o2) {
-                return ((Integer)container_weight.get(o2)).compareTo(container_weight.get(o));
+                return container_weight.get(o2).compareTo(container_weight.get(o));
             }
         });
         return sorted;


[08/14] git commit: MARMOTTA-233: extends module configuration, changes core module properties

Posted by tk...@apache.org.
MARMOTTA-233: extends module configuration,
changes core module properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/99af8863
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/99af8863
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/99af8863

Branch: refs/heads/MARMOTTA-228
Commit: 99af8863eca088e7c0e80f52679383f7d9f4d027
Parents: 81503ab
Author: tkurz <tk...@apache.org>
Authored: Mon May 13 15:32:28 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 13 15:32:28 2013 +0200

----------------------------------------------------------------------
 .../src/main/resources/kiwi-module.properties      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/99af8863/platform/marmotta-core/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/kiwi-module.properties b/platform/marmotta-core/src/main/resources/kiwi-module.properties
index 7265954..122b0e1 100644
--- a/platform/marmotta-core/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-core/src/main/resources/kiwi-module.properties
@@ -20,7 +20,7 @@ name=Core Services
 
 icon=icon-beaker
 
-container=My Core Container
+container=Admin
 container.weight = 10
 
 subtitle = Configure LMF Core


[11/14] git commit: change icon and adminpages

Posted by tk...@apache.org.
change icon and adminpages


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/ffa3de04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/ffa3de04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/ffa3de04

Branch: refs/heads/MARMOTTA-228
Commit: ffa3de04b511e54cf15a07732e371b3392b6a8e0
Parents: 4f0cd9e
Author: tkurz <tk...@apache.org>
Authored: Mon May 13 15:50:45 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 13 15:50:45 2013 +0200

----------------------------------------------------------------------
 .../src/main/resources/kiwi-module.properties      |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/ffa3de04/platform/marmotta-user/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-user/src/main/resources/kiwi-module.properties b/platform/marmotta-user/src/main/resources/kiwi-module.properties
index 60a5965..7639b15 100644
--- a/platform/marmotta-user/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-user/src/main/resources/kiwi-module.properties
@@ -16,20 +16,22 @@
 # limitations under the License.
 #
 
-name=Users
+container=Admin
 
-baseurl=/user
+name=Users
 
-subtitle = Profile and Account Management
+icon=icon-user
 
-icon_small = /admin/img/user_small.png
+baseurl=/user
 
 webservices=org.apache.marmotta.platform.user.webservices.UserWebService,\
             org.apache.marmotta.platform.user.webservices.UserManagementWebService
 
 
-adminpages=/me.html,\
-    /admin/users.html
+adminpage.0.title= About ME
+adminpage.0.link = /me.html
+adminpage.1.title = User Management
+adminpage.1.link = /admin/users.html
 
 
 


[06/14] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta into MARMOTTA-228

Posted by tk...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta into MARMOTTA-228


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/1a351ed9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/1a351ed9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/1a351ed9

Branch: refs/heads/MARMOTTA-228
Commit: 1a351ed9d04ad69f321e5828d288e6007c29cec4
Parents: a614867 5fe2a27
Author: tkurz <tk...@apache.org>
Authored: Fri May 10 15:43:45 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Fri May 10 15:43:45 2013 +0200

----------------------------------------------------------------------
 commons/sesame-tools-facading/pom.xml              |   11 +
 .../commons/sesame/facading/impl/FacadingImpl.java |   84 ++++----
 .../facading/impl/FacadingInvocationHandler.java   |   95 +++++----
 .../commons/sesame/facading/util/FacadeUtils.java  |   39 ++--
 .../sesame/facading/AbstractFacadingTest.java      |   15 +-
 .../builder/FacadingPredicateBuilderTest.java      |    3 +-
 .../collections/CollectionFacadingTest.java        |   21 +-
 .../concurrent/ConcurrentFacadingTest.java         |  172 +++++++++++++++
 .../facading/concurrent/model/FooFacade.java       |   13 +
 .../facading/concurrent/model/TypeFacade.java      |   17 ++
 .../sesame/facading/locale/LocaleFacadingTest.java |    4 +-
 .../facading/primitive/BoxedFacadingTest.java      |  139 ++++++++++++
 .../facading/primitive/PrimitiveFacadingTest.java  |  113 ++++++++++
 .../sesame/facading/primitive/model/Boxed.java     |   34 +++
 .../sesame/facading/primitive/model/Primitive.java |   30 +++
 .../facading/primitive/model/PropBuilder.java      |   12 +
 .../src/test/resources/logback.xml                 |    1 +
 .../marmotta/ldpath/backend/file/ParserTest.java   |   15 +-
 libraries/ldpath/ldpath-core/pom.xml               |    4 +
 .../marmotta/ldpath/model/programs/Program.java    |   20 ++
 .../ldpath/model/selectors/GroupedSelector.java    |  101 +++++++++
 .../model/selectors/IntersectionSelector.java      |    2 +-
 .../ldpath/model/selectors/UnionSelector.java      |    2 +-
 .../marmotta/ldpath/model/tests/IsATest.java       |   57 +++++
 .../ldpath/model/tests/LiteralTypeTest.java        |    2 +-
 .../ldpath/model/tests/PathEqualityTest.java       |    6 +-
 .../model/tests/functions/BinaryNumericTest.java   |    1 -
 .../javacc/at/newmedialab/ldpath/parser/rdfpath.jj |  127 ++++++++----
 .../functions/BinaryNumericTestFunctionsTest.java  |    2 +-
 .../ldpath/model/functions/FunctionsTest.java      |    2 +-
 .../apache/marmotta/ldpath/parser/ParserTest.java  |    6 +-
 .../marmotta/ldpath/parser/SelectorsTest.java      |   83 +++++++
 .../ldpath/parser/StringTestingBackend.java        |   81 +++++++
 .../apache/marmotta/ldpath/parser/TestsTest.java   |   78 +++++++
 .../marmotta/ldpath/test/AbstractTestBase.java     |   36 ++--
 .../src/test/resources/parse/program.ldpath        |    2 +
 .../model/functions/date/DateFunctionsTest.java    |    2 +-
 .../core/services/user/UserServiceImpl.java        |   47 ++--
 38 files changed, 1269 insertions(+), 210 deletions(-)
----------------------------------------------------------------------



[04/14] git commit: first version of restructured ui (with bootstrap)

Posted by tk...@apache.org.
first version of restructured ui (with bootstrap)


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/7f6c383e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/7f6c383e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/7f6c383e

Branch: refs/heads/MARMOTTA-228
Commit: 7f6c383e1c5775999bdfd5d41d876a3f197f6ef9
Parents: 8034519
Author: tkurz <tk...@apache.org>
Authored: Fri May 10 15:42:31 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Fri May 10 15:42:31 2013 +0200

----------------------------------------------------------------------
 .../platform/core/model/template/MenuItemType.java |    9 ++
 .../platform/core/services/modules/AdminPage.java  |  101 ---------------
 .../core/services/modules/AdminPageContainer.java  |   56 --------
 3 files changed, 9 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
new file mode 100644
index 0000000..ce212f6
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
@@ -0,0 +1,9 @@
+package org.apache.marmotta.platform.core.model.template;
+
+/**
+ * ...
+ * <p/>
+ * Author: Thomas Kurz (tkurz@apache.org)
+ */
+public enum MenuItemType {
+}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
deleted file mode 100644
index 4ab3295..0000000
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.marmotta.platform.core.services.modules;
-
-import org.apache.marmotta.platform.core.exception.MarmottaException;
-import org.apache.marmotta.platform.core.exception.TemplatingException;
-
-import java.util.List;
-
-/**
- * This class is used for more complex AdminPage information (e.g. for Templating).
- * <p/>
- * Author: Thomas Kurz (tkurz@apache.org)
- */
-public class AdminPage implements Comparable<AdminPage> {
-
-    private String name;
-    private String path;
-    private boolean important = false;
-    private int number = 0;
-
-    /**
-     * create AdminPage object
-     * @param number for sorting
-     * @param path path to page
-     * @param name name (e.g. in the menu display)
-     * @param important if true, the page can appear in a 'special link' section
-     * @throws MarmottaException
-     */
-    AdminPage(int number, String path, String name, boolean important) throws MarmottaException {
-        if(path==null) throw new MarmottaException("path for admin page must be defined");
-        this.path = path;
-
-        if(name != null) this.name = name;
-        else this.name = getNameFromPath(path);
-
-        this.important = important;
-    }
-
-    /**
-     * Creates and AdminPage just from path
-     * @param path
-     */
-    AdminPage(String path) {
-        this.path= path;
-        this.name = getNameFromPath(path);
-    }
-
-    /**
-     * returns a 'useful' name from path
-     * @param path
-     * @return
-     */
-    private String getNameFromPath(String path) {
-        return path.substring(path.lastIndexOf("/")).replaceAll("/"," ").replaceAll("_"," ").replaceAll(".html","").replaceAll(".jsp","");
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    /**
-     * if numbers are used, the sorting is based on numbers, otherwise on alphabetical order of names
-     * @param adminPage
-     * @return
-     */
-    @Override
-    public int compareTo(AdminPage adminPage) {
-        if(number != adminPage.number) {
-            return name.compareTo(adminPage.name);
-        } else return ((Integer)number).compareTo(adminPage.number);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
deleted file mode 100644
index 438707b..0000000
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.marmotta.platform.core.services.modules;
-
-import java.util.List;
-
-/**
- * ...
- * <p/>
- * Author: Thomas Kurz (tkurz@apache.org)
- */
-public class AdminPageContainer implements Comparable<AdminPageContainer> {
-
-    private int number = 0;
-    private String name;
-    private List<String> modules;
-
-    public AdminPageContainer(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public int compareTo(AdminPageContainer adminPageContainer) {
-        if(number != adminPageContainer.number) return ((Integer)number).compareTo(adminPageContainer.number);
-        return name.compareTo(adminPageContainer.name);
-    }
-
-    public boolean equals(String s) {
-        return name.equals(s);
-    }
-
-    public void addModule(String module) {
-        modules.add(module);
-    }
-
-    public void setNumber(int number) {
-        this.number = number;
-    }
-
-}


[10/14] git commit: changes icon

Posted by tk...@apache.org.
changes icon


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/4f0cd9e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/4f0cd9e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/4f0cd9e2

Branch: refs/heads/MARMOTTA-228
Commit: 4f0cd9e25cbb085c4874c86841be76c370ac2ac5
Parents: 49d098f
Author: tkurz <tk...@apache.org>
Authored: Mon May 13 15:50:27 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Mon May 13 15:50:27 2013 +0200

----------------------------------------------------------------------
 .../src/main/resources/kiwi-module.properties      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4f0cd9e2/platform/marmotta-core/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/kiwi-module.properties b/platform/marmotta-core/src/main/resources/kiwi-module.properties
index 122b0e1..c7b3336 100644
--- a/platform/marmotta-core/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-core/src/main/resources/kiwi-module.properties
@@ -18,7 +18,7 @@
 
 name=Core Services
 
-icon=icon-beaker
+icon=icon-desktop
 
 container=Admin
 container.weight = 10


[05/14] git commit: first version of new ui

Posted by tk...@apache.org.
first version of new ui


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/a6148677
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/a6148677
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/a6148677

Branch: refs/heads/MARMOTTA-228
Commit: a6148677561beb107433129f9ace32f360a2b1cb
Parents: 7f6c383
Author: tkurz <tk...@apache.org>
Authored: Fri May 10 15:43:07 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Fri May 10 15:43:07 2013 +0200

----------------------------------------------------------------------
 .../platform/core/api/modules/ModuleService.java   |   18 +-
 .../core/api/templating/AdminInterfaceService.java |    3 +
 .../platform/core/model/template/MenuItem.java     |   72 +++++-
 .../platform/core/model/template/MenuItemType.java |   21 ++
 .../core/services/modules/ModuleServiceImpl.java   |  164 ++++++++-----
 .../templating/AdminTemplatingServiceImpl.java     |  196 ++++-----------
 .../src/main/resources/config-defaults.properties  |    3 +
 .../src/main/resources/kiwi-module.properties      |   40 ++--
 .../src/main/resources/templates/admin.ftl         |   56 +++--
 9 files changed, 301 insertions(+), 272 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
index b099921..7f26205 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/modules/ModuleService.java
@@ -17,14 +17,12 @@
  */
 package org.apache.marmotta.platform.core.api.modules;
 
-import org.apache.commons.configuration.Configuration;
 import org.apache.marmotta.platform.core.model.module.ModuleConfiguration;
-import org.apache.marmotta.platform.core.services.modules.AdminPage;
-import org.apache.marmotta.platform.core.services.modules.AdminPageContainer;
 
 import javax.enterprise.inject.spi.InjectionPoint;
 import java.net.URL;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -114,7 +112,6 @@ public interface ModuleService {
      * @param moduleName
      * @return
      */
-    @Deprecated
     public List<String> getAdminPages(String moduleName);
 
     /**
@@ -141,16 +138,19 @@ public interface ModuleService {
     public String getIcon(String moduleName);
 
     /**
-     * Returns a list of AdminPage Objects
-     * @param moduleName
+     * Lists containers and underlying modules
      * @return
      */
-    public List<AdminPage> getAdminPageList(String moduleName);
+    public Collection<String> listContainers();
+    public List<String> listSortedContainers();
 
     /**
-     * Lists containers and underlying modules
+     * returns all modules within a container
+     * @param container
      * @return
      */
-    public List<AdminPageContainer> listContainers();
+    public Collection<String> listModules(String container);
+    public List<String> listSortedModules(String container);
 
+    List<HashMap<String,String>> getAdminPageObjects(String moduleName);
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
index d60e9b4..5ec3a6c 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/api/templating/AdminInterfaceService.java
@@ -29,6 +29,9 @@ import javax.servlet.ServletContext;
 public interface AdminInterfaceService {
     
     public final static String PATH = "/templates/";
+    public final static String DEFAULT_REST_PATH = "doc/rest/";
+    public final static String DEFAULT_MENU_ICON = "icon-asterisk";
+    public final static String DEFAULT_WEBSERVICE_TITLE = "Webservice";
 
     /**
      * inits a freebase template service with a servlet context

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
index 883d01e..fd8dfe9 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItem.java
@@ -17,11 +17,16 @@
  */
 package org.apache.marmotta.platform.core.model.template;
 
+import org.apache.marmotta.platform.core.api.templating.AdminInterfaceService;
+import org.apache.marmotta.platform.core.services.templating.AdminTemplatingServiceImpl;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import static org.apache.marmotta.platform.core.model.template.MenuItemType.*;
+
 /**
  * Created with IntelliJ IDEA.
  * User: tkurz
@@ -31,19 +36,68 @@ import java.util.Map;
  */
 public class MenuItem {
 
-    private Map<String,Object> properties;
-    private List<MenuItem> submenu;
+    private boolean active;
+    private String label;
+    private String path;
+    private MenuItemType type;
+    private List<MenuItem> items;
+    private String icon;
+
+    public MenuItem(String label, MenuItemType type) {
+        this.type = type;
+        this.label = label;
+        this.items = new ArrayList<MenuItem>();
+        this.active = false;
+        this.icon = AdminInterfaceService.DEFAULT_MENU_ICON;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
 
-    public MenuItem() {
-        properties = new HashMap<String, Object>();
-        submenu = new ArrayList<MenuItem>();
+    public List<MenuItem> getItems() {
+        return this.items;
     }
 
-    public Map<String, Object> getProperties() {
-        return properties;
+    public void addItem(MenuItem item) {
+        this.addItem(item);
     }
 
-    public List<MenuItem> getSubmenu() {
-        return submenu;
+    public boolean setActive(String path) {
+        switch(type) {
+            case ROOT:
+            case CONTAINER:
+            case MODULE:
+                for(MenuItem item : items) {
+                    if(item.setActive(path)) {
+                        active = true;
+                    } else {
+                        active = false;
+                    }
+                }
+                return active;
+            case PAGE:
+                return active = this.path.equals(path);
+            case WEBSERVICE:
+                return active = path.contains(AdminInterfaceService.DEFAULT_REST_PATH);
+            default:
+                return false;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
index ce212f6..16872ef 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.marmotta.platform.core.model.template;
 
 /**
@@ -6,4 +24,7 @@ package org.apache.marmotta.platform.core.model.template;
  * Author: Thomas Kurz (tkurz@apache.org)
  */
 public enum MenuItemType {
+
+    ROOT,CONTAINER,MODULE,PAGE,WEBSERVICE
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
index 9dbfca9..4864fe1 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/ModuleServiceImpl.java
@@ -18,9 +18,7 @@
 package org.apache.marmotta.platform.core.services.modules;
 
 import com.google.common.collect.ImmutableList;
-import org.apache.marmotta.platform.core.api.config.ConfigurationService;
 import org.apache.marmotta.platform.core.api.modules.ModuleService;
-import org.apache.marmotta.platform.core.exception.MarmottaException;
 import org.apache.marmotta.platform.core.model.module.ModuleConfiguration;
 import org.apache.commons.configuration.CompositeConfiguration;
 import org.apache.commons.configuration.Configuration;
@@ -34,7 +32,6 @@ import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
 import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
 import java.io.IOException;
 import java.net.JarURLConnection;
 import java.net.MalformedURLException;
@@ -51,28 +48,29 @@ import java.util.*;
 public class ModuleServiceImpl implements ModuleService {
 
     private String default_container_name = "Others";
-    private int default_container_number = 100;
+    //private int default_container_number = 100;
 
     private Logger log = LoggerFactory.getLogger(ModuleServiceImpl.class);
 
     private Set<String> modules;
 
-    private List<AdminPageContainer> containers;
+    private HashMap<String,ArrayList<String>> containers;
+
+    private HashMap<String,Integer> container_weight;
 
     private Map<String,Configuration> configurationMap;
     private Map<String, Configuration> jarURLs;
 
-    @Inject
-    ConfigurationService configurationService;
-
     @PostConstruct
     public void initialize() {
 
-        default_container_name = configurationService.getStringConfiguration("kiwi.pages.default_container.name",default_container_name);
-        default_container_number = configurationService.getIntConfiguration("kiwi.pages.default_container.number",default_container_number);
+        //default_container_name = configurationService.getStringConfiguration("kiwi.pages.default_container.name",default_container_name);
+        //default_container_number = configurationService.getIntConfiguration("kiwi.pages.default_container.number",default_container_number);
 
         modules = new HashSet<String>();
-        containers = new ArrayList<AdminPageContainer>();
+        containers = new HashMap<String,ArrayList<String>>();
+        container_weight = new HashMap<String, Integer>();
+
         configurationMap = new HashMap<String, Configuration>();
         jarURLs = new HashMap<String, Configuration>();
 
@@ -93,14 +91,20 @@ public class ModuleServiceImpl implements ModuleService {
                     String moduleName = moduleProperties.getString("name");
                     modules.add(moduleName);
 
+                    String c_name = moduleProperties.getString("container") != null ? moduleProperties.getString("container") : default_container_name;
 
+                    if(containers.get(c_name) == null) {
+                        containers.put(c_name, new ArrayList<String>());
+                    }
+                    containers.get(c_name).add(moduleName);
 
-                    if(moduleProperties.getString("container") != null) {
-                        addContainerModule(moduleProperties.getString("container"),moduleName,moduleProperties.getInt("container.weight",-1));
-                    } else {
-                        addContainerModule(default_container_name,moduleName,default_container_number);
+                    if(container_weight.get(c_name) == null ) {
+                        container_weight.put(c_name,-1);
                     }
 
+                    if(moduleProperties.getString("container.weight") != null) {
+                        container_weight.put(c_name,Math.max(container_weight.get(c_name),moduleProperties.getInt("container.weight",-1)));
+                    }
 
                     URLConnection urlConnection = moduleUrl.openConnection();
                     URL jarUrl;
@@ -130,8 +134,6 @@ public class ModuleServiceImpl implements ModuleService {
                     } catch(ConfigurationException ex) {
                     }
 
-
-
                     // create runtime configuration
                     MapConfiguration runtimeConfiguration = new MapConfiguration(new HashMap<String, Object>());
                     runtimeConfiguration.setProperty("runtime.jarfile", jarUrl.toString());
@@ -148,26 +150,12 @@ public class ModuleServiceImpl implements ModuleService {
 
 
             }
+            //TODO container should be sortable
         } catch (IOException ex) {
             log.error("I/O error while trying to retrieve kiwi-module.properties file",ex);
         }
     }
 
-    private void addContainerModule(String container, String module, int number) {
-        AdminPageContainer c;
-        int i = containers.indexOf(container);
-        if(i>=0) {
-            c = containers.get(i);
-            c.addModule(module);
-        }
-        else {
-            c = new AdminPageContainer(container);
-            containers.add(c);
-            c.addModule(module);
-        }
-        if(number>0) c.setNumber(number);
-    }
-
     /**
      * Provide the current module configuration to the service injecting it
      *
@@ -225,12 +213,60 @@ public class ModuleServiceImpl implements ModuleService {
         return modules;
     }
 
+    public List<String> listSortedModules() {
+        return sortModules(modules);
+    }
+
+    /**
+     * returns all modules within a container
+     * @param container
+     * @return
+     */
+    public Collection<String> listModules(String container) {
+        if(containers.containsKey(container)) {
+            return containers.get(container);
+        } else return null;
+    }
+
+    public List<String> listSortedModules(String container) {
+        if(containers.containsKey(container)) {
+            return sortModules(containers.get(container));
+        } else return null;
+    }
+
+    /**
+     * sort modules
+     * @param m
+     * @return
+     */
+    private List<String> sortModules(Collection<String> m) {
+        List<String> sorted = new ArrayList<String>(m);
+        Collections.sort(sorted,new Comparator<String>() {
+            @Override
+            public int compare(String o, String o2) {
+                return ((Integer) getWeight(o)).compareTo(getWeight(o2));
+            }
+        });
+        return sorted;
+    }
+
     /**
      * Lists containers and underlying modules
      * @return
      */
-    public List<AdminPageContainer> listContainers() {
-        return containers;
+    public Collection<String> listContainers() {
+        return containers.keySet();
+    }
+
+    public List<String> listSortedContainers() {
+        List sorted = new ArrayList(containers.keySet());
+        Collections.sort(sorted,new Comparator<String>() {
+            @Override
+            public int compare(String o, String o2) {
+                return ((Integer)container_weight.get(o)).compareTo(container_weight.get(o2));
+            }
+        });
+        return sorted;
     }
 
     /**
@@ -324,53 +360,53 @@ public class ModuleServiceImpl implements ModuleService {
     }
 
     /**
-     * Return a list of admin pages (paths)
+     * Return a list of admin pages (links)
      * @param moduleName
      * @return
      */
     @Override
-    @Deprecated
     public List<String> getAdminPages(String moduleName) {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();
-        if(config != null) return ImmutableList.copyOf(config.getStringArray("adminpages"));
-        else
+        if(config != null) {
+            if(!config.subset("adminpage.").isEmpty()) {
+                ArrayList<String> l = new ArrayList<String>();
+                while(config.getString("adminpage."+l.size()+".link") != null) {
+                    l.add(config.getString("adminpage."+l.size()+".link"));
+                }
+                return l;
+            } else return ImmutableList.copyOf(config.getStringArray("adminpages"));
+        } else
             return null;
     }
 
     /**
-     * Returns a list of AdminPage Objects
+     * returns  more complex admin page description
      * @param moduleName
      * @return
      */
     @Override
-    public List<AdminPage> getAdminPageList(String moduleName) {
-        ArrayList<AdminPage> l = new ArrayList<AdminPage>();
+    public List<HashMap<String,String>> getAdminPageObjects(String moduleName) {
         Configuration config = getModuleConfiguration(moduleName).getConfiguration();
-
-        if(config==null) return null;
-
-        //test if there are names and order for admin pages
-        if(config.getString("adminpages.0") != null) {
-            int i=0;
-            while(config.getString("adminpages."+i) != null) {
-                try {
-                    l.add(new AdminPage(
-                            i,
-                            config.getString("adminpages." + i + ".path", null),
-                            config.getString("adminpages."+i+".title",null),
-                            config.getBoolean("adminpages."+i+".important",false)
-                    ));
-                } catch (MarmottaException e) {
-                    log.error("admin page cannot be added for module "+moduleName);
+        if(config != null) {
+            ArrayList<HashMap<String,String>> l = new ArrayList<HashMap<String,String>>();
+            if(!config.subset("adminpage.").isEmpty()) {
+                while(config.getString("adminpage."+l.size()+".link") != null) {
+                    HashMap<String,String> map = new HashMap<String, String>();
+                    map.put("link",config.getString("baseurl")+config.getString("adminpage."+l.size()+".link"));
+                    map.put("title",config.getString("adminpage."+l.size()+".title"));
+                    l.add(map);
+                }
+            } else {
+                for(String path : config.getStringArray("adminpages")) {
+                    HashMap<String,String> map = new HashMap<String, String>();
+                    map.put("link",config.getString("baseurl")+path);
+                    map.put("title",path.substring(path.lastIndexOf("/"),path.lastIndexOf(".")).replaceAll("_"," "));
+                    l.add(map);
                 }
             }
-        } else {
-            for(String path : getAdminPages(moduleName)) {
-                l.add(new AdminPage(path));
-            }
-        }
-        Collections.sort(l);
-        return l;
+            return l;
+        } else
+            return null;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
index 2a0279d..247a0b4 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
@@ -19,12 +19,7 @@ package org.apache.marmotta.platform.core.services.templating;
 
 import java.io.ByteArrayOutputStream;
 import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -38,6 +33,7 @@ import org.apache.marmotta.platform.core.api.templating.AdminInterfaceService;
 import org.apache.marmotta.platform.core.api.templating.TemplatingService;
 import org.apache.marmotta.platform.core.exception.TemplatingException;
 import org.apache.marmotta.platform.core.model.template.MenuItem;
+import org.apache.marmotta.platform.core.model.template.MenuItemType;
 
 /**
  * User: Thomas Kurz
@@ -61,15 +57,13 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
     private ConfigurationService configurationService;
 
     //some statics
+    private static final String DEFAULT_ICON = "icon-beaker";
     private static final String TEMPLATE_STRING = "admin.ftl";
-    private static final String DEFAULT_REST_PATH = "/doc/rest/";
-    private static final String DEFAULT_REST_FILE = "overview-summary.html";
-    private static final String DEFAULT_TITLE_FOR_WEBSERVICES = "webservices";
 
 
     //pattern to filter comments content
     private static final Pattern PATTERN = Pattern.compile("\\<!--###BEGIN_([^#]+)###--\\>(.+)\\<!--###END_\\1###--\\>",Pattern.DOTALL);
-    private Menu menu;
+    private MenuItem menu;
 
     /**
      * inits a freemarker template service with a servlet context
@@ -77,7 +71,7 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
      */
     @Override
     public void init(ServletContext context) throws TemplatingException {
-    	menu = new Menu();
+    	buildMenu();
         this.context = context;
         try {
         	 //try-run to check it from the very beginning
@@ -88,20 +82,6 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
     }
 
     /**
-     * Check whether the templating service considers the resource passed in the path as a menu entry it is
-     * responsible for.
-     *
-     * @param path a url path
-     * @return if the give path points to an admin page
-     */
-    @Override
-    public boolean isMenuEntry(String path) {
-        if(menu.path_titles.keySet().contains(configurationService.getPath()+path)) return true;
-        if(path.contains(DEFAULT_REST_PATH)) return true;
-        else return false;
-    }
-
-    /**
      * this method wraps a file with a specified admin template. If the file is not a admin page,
      * the bytes are returned unprocessed
      * @param bytes content represented in a byte array
@@ -112,11 +92,9 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
 
         if(!configurationService.getBooleanConfiguration("templating.cache.enabled",true) && context!=null) {
             init(context);
+            menu.setActive(path);
         }
-        //apply template
-        if(!isMenuEntry(path)) return bytes;
-        //activate
-        String module = menu.getCurrentModule(configurationService.getPath() + path);
+
         //fill data model
         Map<String, Object> datamodel = new HashMap<String,Object>();
     	for(Properties p : Properties.values()) {
@@ -125,9 +103,9 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
         //begin hack!!!
         datamodel.put("USER_MODULE_IS_ACTIVE", moduleService.listModules().contains("Users"));
         //end hack!!!
-        datamodel.put("MODULE_MENU",menu.menuItems);
-        datamodel.put("CURRENT_TITLE", getNameFromPath(path));
-        datamodel.put("CURRENT_MODULE", module);
+
+        //add menu
+        datamodel.put("MENU",menu);
         try {
             String s = new String(bytes);
             Matcher m = PATTERN.matcher(s);
@@ -151,133 +129,47 @@ public class AdminTemplatingServiceImpl implements AdminInterfaceService {
         return bytes;
     }
 
+    @Override
+    public boolean isMenuEntry(String path) {
+        return menu.setActive(path);
+    }
+
     /**
-     * This object represents a menu for the admin interface. It is build using the ModuleService.
+     * build menu
+     * @return
      */
-    class Menu {
-
-        public List<MenuItem> menuItems;
-        public Map<String,String> path_titles;
-
-        public Menu() {
-            //instantiate
-            menuItems = new ArrayList<MenuItem>();
-            path_titles = new HashMap<String, String>();
-            //sort menu
-            ArrayList<String> menuSorted = new ArrayList<String>(moduleService.listModules());
-            if(configurationService.getBooleanConfiguration("templating.sort_by_weight", true)) {
-                Collections.sort(menuSorted, new Comparator<String>() {
-                    @Override
-                    public int compare(String o1, String o2) {
-                        final int w1 = moduleService.getWeight(o1), w2 = moduleService.getWeight(o2);
-                        if (w1 == w2) return o1.compareTo(o2);
-                        return w1 - w2;
-                    }
-                });
-            } else {
-                Collections.sort(menuSorted);
-            }
-
-            //build structure
-            for(String module : menuSorted) {
-                String path = configurationService.getPath() + moduleService.getModuleWeb(module);
-                if(moduleHasAdminPages(module)) {
-                    MenuItem menu_item = new MenuItem();
-                    menu_item.getProperties().put("title",module);
-                    menu_item.getProperties().put("baseurl",moduleService.getModuleConfiguration(module).getConfiguration().getString("baseurl","/"+module));
-                    for(String page : moduleService.getAdminPages(module)) {
-                        if(page.equals("")) {
-                            continue;
-                        }
-                        MenuItem submenu = new MenuItem();
-                        submenu.getProperties().put("title",getNameFromPath(page));
-                        submenu.getProperties().put("path",path+page);
-                        //test if it is active
-                        menu_item.getSubmenu().add(submenu);
-                        path_titles.put(path+page,page);
-                    }
-                    if(moduleService.getWebservices(module)!=null &&
-                            !moduleService.getWebservices(module).isEmpty() &&
-                            !moduleService.getWebservices(module).iterator().next().equals("")) {
-                        MenuItem submenu = new MenuItem();
-                        submenu.getProperties().put("title",DEFAULT_TITLE_FOR_WEBSERVICES);
-                        submenu.getProperties().put("path",path+DEFAULT_REST_PATH+DEFAULT_REST_FILE);
-                        //test if it is active
-                        menu_item.getSubmenu().add(submenu);
-                        path_titles.put(path+DEFAULT_REST_PATH+DEFAULT_REST_FILE,DEFAULT_TITLE_FOR_WEBSERVICES);
-                    }
-                    menuItems.add(menu_item);
+    private MenuItem buildMenu() {
+        MenuItem menu = new MenuItem("MENU",MenuItemType.ROOT);
+
+        for(String container_string : moduleService.listSortedContainers()) {
+            MenuItem container = new MenuItem(container_string, MenuItemType.CONTAINER);
+
+            //add modules
+            for(String module_string : moduleService.listSortedModules(container_string)) {
+                MenuItem module = new MenuItem(module_string, MenuItemType.MODULE);
+                module.setPath(moduleService.getModuleWeb(module_string));
+                module.setIcon(moduleService.getIcon(module_string));
+
+                //add pages
+                for(HashMap<String,String> page_object : moduleService.getAdminPageObjects(module_string)) {
+                    MenuItem page = new MenuItem(page_object.get("title"), MenuItemType.PAGE);
+                    page.setPath(page_object.get("path"));
+                    module.addItem(page);
                 }
-            }
-        }
 
-        /**
-         * get current module and set submenu to active
-         * @param path the current system path
-         * @return current module name
-         */
-        public String getCurrentModule(String path) {
-            String module = "";
-            boolean active = false;
-            //test with module and submenu must be active
-            for(MenuItem menuItem : menuItems) {
-                if(path.startsWith((String)menuItem.getProperties().get("baseurl"))) {
-                    module = (String)menuItem.getProperties().get("title");
+                //add webservice
+                if(!moduleService.getWebservices(module_string).isEmpty()) {
+                    MenuItem page = new MenuItem(DEFAULT_WEBSERVICE_TITLE, MenuItemType.MODULE);
+                    page.setPath(module.getPath()+DEFAULT_REST_PATH);
                 }
-                menuItem.getProperties().put("active",false);
-                for(MenuItem submenu : menuItem.getSubmenu()) {
-                    if(submenu.getProperties().get("path").equals(path)) {
-                        submenu.getProperties().put("active",true);
-                        menuItem.getProperties().put("active",true);
-                        module = (String)menuItem.getProperties().get("title");
-                        active = true;
-                    } else {
-                        submenu.getProperties().put("active",false);
-                    }
-                }
-            }
-            //workaround for webservices (autogenerated pages that are nit fix stored in the menu structure)
-            if(!active) {
-                for(MenuItem menuItem : menuItems) {
-                    if(module.equals(menuItem.getProperties().get("title"))) {
-                        for(MenuItem submenu : menuItem.getSubmenu()) {
-                            if(submenu.getProperties().get("title").equals(DEFAULT_TITLE_FOR_WEBSERVICES)) {
-                                submenu.getProperties().put("active",true);
-                                menuItem.getProperties().put("active",true);
-                            }
-                        }
-                    }
-                }
-            }
-            return module;
-        }
 
-        /**
-         * Tests if a module should appear in the menu
-         * @param module a module name
-         * @return true is module should appear, false if not
-         */
-        private boolean moduleHasAdminPages(String module) {
-            if(moduleService.getAdminPages(module)!=null &&
-                    !moduleService.getAdminPages(module).isEmpty() &&
-                    !moduleService.getAdminPages(module).get(0).equals(""))
-                return true;
-            else if(moduleService.getWebservices(module)!=null &&
-                    !moduleService.getWebservices(module).isEmpty() &&
-                    !moduleService.getWebservices(module).iterator().next().equals("")) return true;
-            return false;
+                //add if there are pages to display
+                if(!module.getItems().isEmpty()) container.addItem(module);
+            }
+            menu.addItem(container);
         }
 
+        return menu;
     }
 
-    /**
-     * returns a proper name for a path by using the filename.
-     * @param path
-     * @return
-     */
-    private String getNameFromPath(String path) {
-        if(path.contains(DEFAULT_REST_PATH)) return DEFAULT_TITLE_FOR_WEBSERVICES;
-        return path.substring(path.lastIndexOf("/")).replaceAll("/"," ").replaceAll("_"," ").replaceAll(".html","").replaceAll(".jsp","");
-    }
-
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties
index 32911a2..8d70256 100644
--- a/platform/marmotta-core/src/main/resources/config-defaults.properties
+++ b/platform/marmotta-core/src/main/resources/config-defaults.properties
@@ -68,6 +68,9 @@ kiwi.pages.default_container.name = Others
 # ordering number for default container
 kiwi.pages.default_container.number = 100
 
+# default icon for admin page
+kiwi.pages.link.default_icon = icon-beaker
+
 # enable or disable the logging of debugging messages for the whole system
 debug.enabled = false
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/kiwi-module.properties b/platform/marmotta-core/src/main/resources/kiwi-module.properties
index adce8f8..7265954 100644
--- a/platform/marmotta-core/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-core/src/main/resources/kiwi-module.properties
@@ -31,35 +31,35 @@ icon_small = /admin/img/config_small.png
 #do not change!!!
 baseurl=/core
 
-adminpages.0.title=About
-adminpages.0.link=/admin/about.html
+adminpage.0.title=About
+adminpage.0.link=/admin/about.html
 
-adminpages.1.title=Core Configuration
-adminpages.1.link=/admin/configuration.html
+adminpage.1.title=Core Configuration
+adminpage.1.link=/admin/configuration.html
 
-adminpages.2.title=Tasks
-adminpages.2.link=/admin/tasks.html
+adminpage.2.title=Tasks
+adminpage.2.link=/admin/tasks.html
 
-adminpages.3.title=Import
-adminpages.3.link=/admin/import.html
+adminpage.3.title=Import
+adminpage.3.link=/admin/import.html
 
-adminpages.4.title=Export
-adminpages.4.link=/admin/export.html
+adminpage.4.title=Export
+adminpage.4.link=/admin/export.html
 
-adminpages.5.title=Data Views
-adminpages.5.link=/admin/dataview.html
+adminpage.5.title=Data Views
+adminpage.5.link=/admin/dataview.html
 
-adminpages.6.title=Context Manager
-adminpages.6.link=/admin/contexts.html
+adminpage.6.title=Context Manager
+adminpage.6.link=/admin/contexts.html
 
-adminpages.7.title=Prefix Manager
-adminpages.7.link=/admin/prefixes.html
+adminpage.7.title=Prefix Manager
+adminpage.7.link=/admin/prefixes.html
 
-adminpages.8.title=System
-adminpages.8.link=/admin/system.html
+adminpage.8.title=System
+adminpage.8.link=/admin/system.html
 
-adminpages.9.title=Database
-adminpages.9.link=/admin/database.html
+adminpage.9.title=Database
+adminpage.9.link=/admin/database.html
 
 webservices=org.apache.marmotta.platform.core.webservices.config.ConfigurationWebService,\
   org.apache.marmotta.platform.core.webservices.config.DependenciesWebService,\

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/a6148677/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index 370c415..fa0e2ed 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -64,17 +64,25 @@
 
 <div class="well sidebar-nav square-corners menu-level-2 span3 full-height">
     <ul class="nav nav-list">
-        <li class="nav-header">$menu_container</li>
-        <#list MODULE_MENU as menu>
-                    <li
-                        <#if menu.properties["active"]> class="active" </#if>
+        <#list MENU as menu>
+        <li class="nav-header">${menu["label"]}</li>
+        <#list menu.modules as submenu>
+            <li
+                <#if submenu["active"]> class="active" </#if>
                     >
-                        <a href="${menu.submenu[0].properties["path"]}">
-                            <i class="icon-random"></i>  <!-- TODO icon -->
-                            <span>${menu.properties["title"]}</span>
-                        </a>
-                    </li>
-         </#list>
+                <a href="${SERVER_URL}${submenu["path"]}
+                <#if submenu["pages"]??>
+                    ${submenu["pages"][0]["link"]}"
+                <#else>
+                        doc/rest/index.html"
+                </#if>
+                >
+                    <i class="${submenu["icon"]}"></i>  <!-- TODO icon -->
+                    <span>${submenu["label"]}</span>
+                </a>
+            </li>
+        </#list>
+        </#list>
     </ul>
 </div><!--/.well -->
 
@@ -82,14 +90,26 @@
     <div class="offset3 span9">
 
         <ul class="nav nav-tabs square-corners">
-        <#list MODULE_MENU as menu>
-            <#if menu.properties["active"]>
-                <#list menu.submenu as submenu>
-                    <li
-                        <#if submenu.properties["active"]> class="active" </#if>
-                    >
-                        <a href="${submenu.properties["path"]}">${submenu.properties["title"]}</a>
-                    </li>
+        <#list MENU as menu>
+            <#if menu["active"]>
+                <#list menu["modules"] as submenu>
+                    <#if submenu["active"]>
+                        <#list submenu["pages"] as pages>
+                                <li
+                                <#if pages["active"]> class="active" </#if>
+                                >
+                                    <a href="${SERVER_URL}${submenu["path"]}${pages["link"]}">${pages["label"]}</a>
+                                </li>
+                        </#list>
+                        <#if submenu["webservice"]>
+                            <li
+                            <#if submenu["webservice_active"]> class="active" </#if>
+                            >
+                                <a href="${SERVER_URL}${submenu["path"]}doc/rest/index.html">webservice</a>
+                            </li>
+
+                        </#if>
+                    </#if>
                 </#list>
             </#if>
         </#list>