Author: ogrisel
Date: Fri Apr  1 11:34:17 2011
New Revision: 1087654

URL: http://svn.apache.org/viewvc?rev=1087654&view=rev
Log:
STANBOL-120: started work to make the home page menu dynamic too

Added:
    
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/enginesDescription.ftl
    
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/storeDescription.ftl
Modified:
    
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
    
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
    
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java

Modified: 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java?rev=1087654&r1=1087653&r2=1087654&view=diff
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
 (original)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
 Fri Apr  1 11:34:17 2011
@@ -25,4 +25,20 @@ public class NavigationLink implements C
         return order - other.order;
     }
 
+    public String getLabel() {
+        return label;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public String getDescriptionTemplate() {
+        return descriptionTemplate;
+    }
+
+    public int getOrder() {
+        return order;
+    }
+
 }

Modified: 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl?rev=1087654&r1=1087653&r2=1087654&view=diff
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
 (original)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
 Fri Apr  1 11:34:17 2011
@@ -15,15 +15,10 @@ documentation and join the mailing list.
 view that documents the matching RESTful API for applications:</p>
 <dl>
 
-  <dt><a href="engines">/engines</a><dt>
-  <dd>This is a <strong>stateless interface</strong> to allow clients to 
submit content to <strong>analyze</strong>
-   by the <code>EnhancementEngine</code>s and get the resulting <strong>RDF 
enhancements</strong> at once
-   without storing anything on the server-side.</dd>
-
-  <dt><a href="store">/store</a><dt>
-  <dd>This is a <strong>stateful interface</strong> to submit content to 
<strong>analyze and store
-   the results</strong> on the server. It is then possible to browse the 
resulting enhanced
-   content items.</dd>
+  <#list it.navigationLinks as link>
+    <dt><a href="${it.publicBaseUri}${link.path}">${link.label}</a><dt>
+    <dd><#include "${link.descriptionTemplate}"></dd>
+  </#list>
 
   <dt><a href="sparql">/sparql</a><dt>
   <dd>This is the <strong>SPARQL endpoint</strong> for the Stanbol store.

Modified: 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java?rev=1087654&r1=1087653&r2=1087654&view=diff
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java
 (original)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/fragment/EnhancerWebFragment.java
 Fri Apr  1 11:34:17 2011
@@ -93,8 +93,8 @@ public class EnhancerWebFragment impleme
     @Override
     public List<NavigationLink> getNavigationLinks() {
         List<NavigationLink> links = new ArrayList<NavigationLink>();
-        links.add(new NavigationLink("engines", "/engines", "todo", 10));
-        links.add(new NavigationLink("store", "/store", "todo", 20));
+        links.add(new NavigationLink("engines", "/engines", 
"/imports/enginesDescription.ftl", 10));
+        links.add(new NavigationLink("store", "/store", 
"/imports/storeDescription.ftl", 20));
         return links;
     }
 

Added: 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/enginesDescription.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/enginesDescription.ftl?rev=1087654&view=auto
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/enginesDescription.ftl
 (added)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/enginesDescription.ftl
 Fri Apr  1 11:34:17 2011
@@ -0,0 +1,4 @@
+This is a <strong>stateless interface</strong> to allow clients to submit
+content to <strong>analyze</strong> by the <code>EnhancementEngine</code>s
+and get the resulting <strong>RDF enhancements</strong> at once without
+storing anything on the server-side.
\ No newline at end of file

Added: 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/storeDescription.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/storeDescription.ftl?rev=1087654&view=auto
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/storeDescription.ftl
 (added)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/enhancer/jersey/src/main/resources/org/apache/stanbol/enhancer/jersey/templates/imports/storeDescription.ftl
 Fri Apr  1 11:34:17 2011
@@ -0,0 +1,3 @@
+This is a <strong>stateful interface</strong> to submit content to <strong>
+analyze and store the results</strong> on the server. It is then possible
+to browse the resulting enhanced content items.
\ No newline at end of file


Reply via email to