jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1293926 - in /incubator/jena/Jena2/Fuseki/trunk: pages/control-panel.tpl src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java
Date Sun, 26 Feb 2012 20:10:03 GMT
Author: andy
Date: Sun Feb 26 20:10:02 2012
New Revision: 1293926

URL: http://svn.apache.org/viewvc?rev=1293926&view=rev
Log: (empty)

Modified:
    incubator/jena/Jena2/Fuseki/trunk/pages/control-panel.tpl
    incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java

Modified: incubator/jena/Jena2/Fuseki/trunk/pages/control-panel.tpl
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/pages/control-panel.tpl?rev=1293926&r1=1293925&r2=1293926&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/pages/control-panel.tpl (original)
+++ incubator/jena/Jena2/Fuseki/trunk/pages/control-panel.tpl Sun Feb 26 20:10:02 2012
@@ -7,10 +7,14 @@
   <body>
     <h1>Fuseki Control Panel</h1>
 
+#set( $datasets = $mgt.datasets($request) )
+
     <div class="moreindent">
     <form action="dataset" method="post">
       Dataset: <select name="dataset">
-        ${mgt.datasetsAsSelectOptions($request)}
+#foreach($ds in $datasets)
+        <option value="${ds}">${ds}</option>
+#end
       <div>
         <input type="submit" value="Select">
       </div>

Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java?rev=1293926&r1=1293925&r2=1293926&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java
(original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/MgtFunctions.java
Sun Feb 26 20:10:02 2012
@@ -19,6 +19,7 @@
 package org.apache.jena.fuseki.mgt;
 
 import java.util.Iterator ;
+import java.util.List ;
 
 import javax.servlet.http.HttpServletRequest ;
 import javax.servlet.http.HttpSession ;
@@ -26,6 +27,7 @@ import javax.servlet.http.HttpSession ;
 import org.apache.jena.fuseki.server.DatasetRef ;
 import org.apache.jena.fuseki.server.DatasetRegistry ;
 import org.openjena.atlas.io.IndentedLineBuffer ;
+import org.openjena.atlas.iterator.Iter ;
 
 import com.hp.hpl.jena.shared.PrefixMapping ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
@@ -64,8 +66,16 @@ public class MgtFunctions
         String ds = (String)session.getAttribute("dataset") ;
         return DatasetRegistry.get().get(ds) ;
     }
-    
+
     /** Return lists of datasets */ 
+    public static List<String> datasets(HttpServletRequest request)
+    {
+        return Iter.toList(DatasetRegistry.get().keys()) ;
+    }
+
+    
+    /* remove soon - simply for backwards compatibility with Fuseki+JSP */
+    @Deprecated
     public static String datasetsAsSelectOptions(HttpServletRequest request)
     {
         StringBuilder buff = new StringBuilder() ;
@@ -78,7 +88,9 @@ public class MgtFunctions
         }
         return buff.toString() ;
     }
-    /** Return lists of datasets */ 
+    
+    /* remove soon - simply for backwards compatibility with Fuseki+JSP */
+    @Deprecated
     public static String datasetsAsListItems(HttpServletRequest request)
     {
         StringBuilder buff = new StringBuilder() ;



Mime
View raw message