You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2013/12/24 19:42:37 UTC

svn commit: r1553314 - in /jena/branches/jena-fuseki-new-ui: ./ src-dev/dev/ src/main/java/org/apache/jena/fuseki/ src/main/java/org/apache/jena/fuseki/mgt/ src/main/java/org/apache/jena/fuseki/server/ src/main/java/org/apache/jena/fuseki/servlets/

Author: andy
Date: Tue Dec 24 18:42:36 2013
New Revision: 1553314

URL: http://svn.apache.org/r1553314
Log:
Cleaning up.
Remove need for Apache commons lang
(only one function used; there is a Java runtime function equivalent)
Align to ARQ

Added:
    jena/branches/jena-fuseki-new-ui/pom-war.xml
Modified:
    jena/branches/jena-fuseki-new-ui/classpath-jetty-8.1.11
    jena/branches/jena-fuseki-new-ui/classpath-jetty-9.1.0
    jena/branches/jena-fuseki-new-ui/pom.xml
    jena/branches/jena-fuseki-new-ui/src-dev/dev/PROJECT.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/Fuseki.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/FusekiLib.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java

Modified: jena/branches/jena-fuseki-new-ui/classpath-jetty-8.1.11
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/classpath-jetty-8.1.11?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/classpath-jetty-8.1.11 (original)
+++ jena/branches/jena-fuseki-new-ui/classpath-jetty-8.1.11 Tue Dec 24 18:42:36 2013
@@ -5,7 +5,11 @@
   <classpathentry excluding="org/apache/jena/fuseki/fuseki-properties.xml|META-INF/NOTICE|META-INF/LICENSE|META-INF/DEPENDENCIES|**/*.java" kind="src" path="src/main/resources"/>
   <classpathentry including="**/*.java" kind="src" path="src-dev"/>
 
+  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-text/1.0.1-SNAPSHOT/jena-text-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-text/1.0.1-SNAPSHOT/jena-text-1.0.1-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-spatial/1.0.1-SNAPSHOT/jena-spatial-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-spatial/1.0.1-SNAPSHOT/jena-spatial-1.0.1-SNAPSHOT-sources.jar"/>
+
   <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/1.0.1-SNAPSHOT/jena-iri-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-iri/1.0.1-SNAPSHOT/jena-iri-1.0.1-SNAPSHOT-sources.jar"/>
+
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar" sourcepath="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar"/>
@@ -33,12 +37,10 @@
 
   <classpathentry kind="var" path="M2_REPO/org/apache/velocity/velocity/1.7/velocity-1.7.jar" sourcepath="M2_REPO/org/apache/velocity/velocity/1.7/velocity-1.7-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4-sources.jar"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-arq"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-tdb"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-core"/>
-  <classpathentry combineaccessrules="false" kind="src" path="/jena-text"/>
   <classpathentry kind="output" path="classes"/>
 </classpath>

Modified: jena/branches/jena-fuseki-new-ui/classpath-jetty-9.1.0
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/classpath-jetty-9.1.0?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/classpath-jetty-9.1.0 (original)
+++ jena/branches/jena-fuseki-new-ui/classpath-jetty-9.1.0 Tue Dec 24 18:42:36 2013
@@ -5,6 +5,9 @@
   <classpathentry excluding="org/apache/jena/fuseki/fuseki-properties.xml|META-INF/NOTICE|META-INF/LICENSE|META-INF/DEPENDENCIES|**/*.java" kind="src" path="src/main/resources"/>
   <classpathentry including="**/*.java" kind="src" path="src-dev"/>
 
+  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-text/1.0.1-SNAPSHOT/jena-text-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-text/1.0.1-SNAPSHOT/jena-text-1.0.1-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-spatial/1.0.1-SNAPSHOT/jena-spatial-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-spatial/1.0.1-SNAPSHOT/jena-spatial-1.0.1-SNAPSHOT-sources.jar"/>
+
   <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/1.0.1-SNAPSHOT/jena-iri-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/jena/jena-iri/1.0.1-SNAPSHOT/jena-iri-1.0.1-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4-sources.jar"/>
@@ -33,12 +36,10 @@
   <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/9.1.0.v20131115/jetty-util-9.1.0.v20131115.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-util/9.1.0.v20131115/jetty-util-9.1.0.v20131115-sources.jar"/>
 
   <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.4/jcl-over-slf4j-1.6.4-sources.jar"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-arq"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-tdb"/>
   <classpathentry combineaccessrules="false" kind="src" path="/jena-core"/>
-  <classpathentry combineaccessrules="false" kind="src" path="/jena-text"/>
   <classpathentry kind="output" path="classes"/>
 </classpath>

Added: jena/branches/jena-fuseki-new-ui/pom-war.xml
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pom-war.xml?rev=1553314&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pom-war.xml (added)
+++ jena/branches/jena-fuseki-new-ui/pom-war.xml Tue Dec 24 18:42:36 2013
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.jena</groupId>
+  <artifactId>jena-fuseki-webapp</artifactId>
+  <packaging>war</packaging>
+  <name>Apache Jena - Fuseki (SPARQL 1.1 Server)</name>
+  <version>0.0.0-SNAPSHOT</version>
+  <description>Fuseki packages as a WAR file.</description>
+  <url>http://jena.apache.org/</url>
+
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-parent</artifactId>
+    <version>8-SNAPSHOT</version>
+    <relativePath>../jena-parent</relativePath>
+  </parent> 
+
+  <!-- Need if the parent is a snapshot -->
+  <repositories>
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+      <releases>
+	<enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+
+  <organization>
+    <name>Apache Jena</name>
+    <url>http://jena.apache.org/</url>
+  </organization>
+
+  <licenses>
+    <license>
+      <name>Apache 2.0 License</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>scm:svn:https://svn.apache.org/repos/asf/jena/tags/jena-2.10.2-SNAPSHOT/jena-fuseki</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/jena/tags/jena-2.10.2-SNAPSHOT/jena-fuseki</developerConnection>
+    <url>https://svn.apache.org/repos/asf/jena/tags/jena-2.10.2-SNAPSHOT/jena-fuseki</url>
+  </scm>
+
+  <properties>
+    <this.root>${project.artifactId}-${project.version}</this.root>
+    <ver.fuseki>1.0.1-SNAPSHOT</ver.fuseki>
+    <ver.jetty>8.1.11.v20130520</ver.jetty>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-arq</artifactId>
+      <version>2.11.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-arq</artifactId>
+      <version>2.11.1-SNAPSHOT</version>
+      <classifier>tests</classifier>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-core</artifactId>
+      <version>2.11.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-tdb</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-text</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-spatial</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+      <version>4.11</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>${ver.httpclient}</version>
+      <exclusions>
+        <!-- Replace with slf4j adapter -->
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.2.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-webapp</artifactId>
+      <version>${ver.jetty}</version>
+    </dependency>    
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlets</artifactId>
+      <version>${ver.jetty}</version>
+    </dependency>    
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${ver.slf4j}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${ver.slf4j}</version>
+    </dependency>
+
+    <!-- Intercept any uses of Jakarta Commons Logging e.g. Apache Common HTTP client. -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <version>${ver.slf4j}</version>
+    </dependency>
+
+    <!-- Needed because the Fuseki test suite resets logging levels -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>${ver.log4j}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.jms</groupId>
+          <artifactId>jms</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jdmk</groupId>
+          <artifactId>jmxtools</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jmx</groupId>
+          <artifactId>jmxri</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.mail</groupId>
+          <artifactId>mail</artifactId>
+        </exclusion>
+      </exclusions> 
+    </dependency>
+
+
+  </dependencies>
+
+  <build>
+    <finalName>apache-jena-fuseki</finalName>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+          <optimize>true</optimize>
+          <debug>true</debug>
+          <debuglevel>source,lines,vars</debuglevel>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+	<version>2.4</version>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.9</version>
+        <configuration>
+          <includes>
+            <include>**/TS_*.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <overWriteReleases>false</overWriteReleases>
+          <overWriteIfNewer>true</overWriteIfNewer>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.5</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+      <plugin>
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-war-plugin</artifactId>
+	<version>2.4</version>
+	<configuration>
+	  <webXml>war-web.xml</webXml>
+	  <!--
+	    When using the Fuseki build of a standalone server,
+	    miss out the embedded jetty server, and the servlet API
+	    jar (2 names possible).
+	    Later - refactor the Fuseki build.
+	  -->
+	  <packagingExcludes>WEB-INF/lib/servlet-api*.jar,WEB-INF/lib/javax.servlet*.jar,WEB-INF/lib/jetty-*.jar</packagingExcludes>
+	</configuration>
+
+      </plugin>
+
+      <!-- Run the application using "mvn jetty:run" -->
+      <!-- org.eclipse at v9 -->
+      <plugin>
+	<groupId>org.mortbay.jetty</groupId>
+	<artifactId>jetty-maven-plugin</artifactId>
+	<version>${ver.jetty}</version>
+	<!--
+	<configuration>
+	  <webApp>
+	    <contextPath>/FUSEKI</contextPath>
+	  </webApp>
+	</configuration>
+	-->
+      </plugin>
+
+    </plugins>
+
+  </build>
+  
+</project>

Modified: jena/branches/jena-fuseki-new-ui/pom.xml
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pom.xml?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pom.xml (original)
+++ jena/branches/jena-fuseki-new-ui/pom.xml Tue Dec 24 18:42:36 2013
@@ -19,7 +19,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.jena</groupId>
-  <artifactId>jena-fuseki</artifactId>
+  <artifactId>jena-fuseki2</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - Fuseki (SPARQL 1.1 Server)</name>
   <version>1.0.1-SNAPSHOT</version>

Modified: jena/branches/jena-fuseki-new-ui/src-dev/dev/PROJECT.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src-dev/dev/PROJECT.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src-dev/dev/PROJECT.java (original)
+++ jena/branches/jena-fuseki-new-ui/src-dev/dev/PROJECT.java Tue Dec 24 18:42:36 2013
@@ -26,7 +26,6 @@ public class PROJECT {
     
     // Webapp-ization
     //   Shiro - security.
-    //   Initialize in webapp. See FusekiCmd.exec
     //   Need server wide configuration - ARQ context setting. 
     //   ContextPath
     //   Fuseki.configure/defaultConfiguration
@@ -48,7 +47,5 @@ public class PROJECT {
     
     // The whole X_Config thing
     // Check compression enabled for UberServlet
-    
-    // http://localhost:3030/$/optimize
 }
 

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/Fuseki.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/Fuseki.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/Fuseki.java (original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/Fuseki.java Tue Dec 24 18:42:36 2013
@@ -30,27 +30,12 @@ import org.slf4j.LoggerFactory ;
 import com.hp.hpl.jena.query.ARQ ;
 import com.hp.hpl.jena.sparql.SystemARQ ;
 import com.hp.hpl.jena.sparql.lib.Metadata ;
-import com.hp.hpl.jena.sparql.mgt.ARQMgt ;
 import com.hp.hpl.jena.sparql.mgt.SystemInfo ;
 import com.hp.hpl.jena.sparql.util.Context ;
 import com.hp.hpl.jena.sparql.util.MappingRegistry ;
 import com.hp.hpl.jena.tdb.TDB ;
 import com.hp.hpl.jena.tdb.transaction.TransactionManager ;
 
-/**
- * <p>
- * The main class enabling us to:
- * </p>
- * <ol>
- * <li>create instances of a Fuseki server e.g. the ARQ, RIOT and TDB server
- * stack</li>
- * <li>get server global {@link com.hp.hpl.jena.sparql.util.Context} e.g. named
- * values used to pass implementation-specific parameters across general
- * interfaces.</li>
- * <li>get the {@link org.apache.jena.fuseki.server.SPARQLServer} instance.</li>
- * <li>set the {@link org.apache.jena.fuseki.server.SPARQLServer} instance.</li>
- * 
- */
 public class Fuseki {
     /** Path to ??? */
     static public String    PATH                         = "org.apache.jena.fuseki" ;
@@ -160,8 +145,7 @@ public class Fuseki {
             return ;
         initialized = true ;
         ARQ.init() ;
-        SystemInfo sysInfo = new SystemInfo(FusekiIRI, VERSION, BUILD_DATE) ;
-        ARQMgt.register(PATH + ".system:type=SystemInfo", sysInfo) ;
+        SystemInfo sysInfo = new SystemInfo(FusekiIRI, PATH, VERSION, BUILD_DATE) ;
         SystemARQ.registerSubSystem(sysInfo) ;
         RIOT.init() ;
         TDB.init() ;

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/FusekiLib.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/FusekiLib.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/FusekiLib.java (original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/FusekiLib.java Tue Dec 24 18:42:36 2013
@@ -22,7 +22,6 @@ import java.util.Iterator ;
 
 import javax.servlet.http.HttpServletRequest ;
 
-import org.apache.commons.lang.StringUtils ;
 import org.apache.jena.atlas.lib.MultiMap ;
 import org.apache.jena.atlas.lib.MultiMapToList ;
 import org.apache.jena.atlas.web.ContentType ;
@@ -121,11 +120,11 @@ public class FusekiLib {
     
     public static String safeParameter(HttpServletRequest request, String pName) {
         String value = request.getParameter(pName) ;
-        value = StringUtils.replaceChars(value, "\r", "") ;
-        value = StringUtils.replaceChars(value, "\n", "") ;
+        value = value.replace("\r", "") ;
+        value = value.replace("\n", "") ;
         return value ;
     }
-
+    
     // Do the addition directly on the dataset
     public static void addDataInto(Graph data, DatasetGraph dsg, Node graphName) {
         // Prefixes?

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java (original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java Tue Dec 24 18:42:36 2013
@@ -45,110 +45,106 @@ import org.apache.jena.web.HttpSC ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.util.Utils ;
 
-public class ActionBackup extends ActionCtl /* XXX This is a RequestAction not a control action */
+public class ActionBackup extends ActionCtl
 {
-    public ActionBackup() { super() ; }
+    // OLD WORLD
+    public ActionBackup() {
+        super() ;
+    }
 
     // Limit to one backup at a time.
     public static final ExecutorService backupService = Executors.newFixedThreadPool(1) ;
-    
+
     @Override
     protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        doCommon(request, response); 
+        doCommon(request, response) ;
     }
-    
+
     @Override
-    protected void perform(HttpAction action)
-    {
+    protected void perform(HttpAction action) {
         String dataset = FusekiLib.safeParameter(action.request, "dataset") ;
-        if ( dataset == null )
-        {
+        if ( dataset == null ) {
             ServletOps.errorBadRequest("Required parameter missing: ?dataset=") ;
             return ;
         }
-        
-        if ( ! dataset.startsWith("/") )
-            dataset="/"+dataset ;
-        
+
+        if ( !dataset.startsWith("/") )
+            dataset = "/" + dataset ;
+
         // HttpSession session = request.getSession(true) ;
         // session.setAttribute("dataset", dataset) ;
         // session.setMaxInactiveInterval(15*60) ; // 10 mins
 
         boolean known = DatasetRegistry.get().isRegistered(dataset) ;
-        if (!known)
-        {
+        if ( !known ) {
             ServletOps.errorBadRequest("No such dataset: " + dataset) ;
             return ;
         }
-        
+
         DatasetRef ref = DatasetRegistry.get().get(dataset) ;
-        action.setRequestRef(ref, dataset);
+        action.setRequestRef(ref, dataset) ;
         scheduleBackup(action) ;
         ServletOps.success(action) ;
     }
 
-    static final String BackupArea = "backups" ;  
-    
-    private void scheduleBackup(final HttpAction action)
-    {
+    static final String BackupArea = "backups" ;
+
+    private void scheduleBackup(final HttpAction action) {
         String dsName = action.dsRef.name ;
-        final String ds = dsName.startsWith("/")? dsName : "/"+dsName ;
-        
+        final String ds = dsName.startsWith("/") ? dsName : "/" + dsName ;
+
         String timestamp = Utils.nowAsString("yyyy-MM-dd_HH-mm-ss") ;
         final String filename = BackupArea + ds + "_" + timestamp ;
         FileOps.ensureDir(BackupArea) ;
-        
+
         try {
             final Callable<Boolean> task = new Callable<Boolean>() {
                 @Override
-                public Boolean call() throws Exception
-                {
+                public Boolean call() throws Exception {
                     action.log.info(format("[%d] Start backup %s to '%s'", action.id, ds, filename)) ;
                     action.beginRead() ;
                     try {
                         backup(action.getActiveDSG(), filename) ;
                         action.log.info(format("[%d] Finish backup %s to '%s'", action.id, ds, filename)) ;
-                    }
-                    catch ( RuntimeException ex )
-                    {
+                    } catch (RuntimeException ex) {
                         action.log.info(format("[%d] Exception during backup: ", action.id, ex.getMessage()), ex) ;
                         return Boolean.FALSE ;
-                    }
-                    finally {
+                    } finally {
                         action.endRead() ;
                     }
                     return Boolean.TRUE ;
-                }} ;
-            
-                action.log.info(format("[%d] Schedule backup %s to '%s'", action.id, ds, filename)) ;                
+                }
+            } ;
+
+            action.log.info(format("[%d] Schedule backup %s to '%s'", action.id, ds, filename)) ;
             backupService.submit(task) ;
-        } 
-        //catch (FusekiException ex)
-        catch (RuntimeException ex)
-        {
+        }
+        // catch (FusekiException ex)
+        catch (RuntimeException ex) {
             action.log.warn("Unanticipated exception", ex) ;
-            try { action.response.sendError(HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ; }
-            catch (IOException e) { IO.exception(e) ; }
-            return ;            
+            try {
+                action.response.sendError(HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
+            } catch (IOException e) {
+                IO.exception(e) ;
+            }
+            return ;
         }
-        
+
         successPage(action, "Backup scheduled - see server log for details") ;
     }
-    
+
     // Share with new ServletBase.
-    protected static void successPage(HttpAction action, String message)
-    {
+    protected static void successPage(HttpAction action, String message) {
         try {
-            action.response.setContentType("text/html");
-            action.response.setStatus(HttpSC.OK_200);
+            action.response.setContentType("text/html") ;
+            action.response.setStatus(HttpSC.OK_200) ;
             PrintWriter out = action.response.getWriter() ;
             out.println("<html>") ;
             out.println("<head>") ;
             out.println("</head>") ;
             out.println("<body>") ;
-            out.println("<h1>Success</h1>");
-            if ( message != null )
-            {
+            out.println("<h1>Success</h1>") ;
+            if ( message != null ) {
                 out.println("<p>") ;
                 out.println(message) ;
                 out.println("</p>") ;
@@ -156,45 +152,43 @@ public class ActionBackup extends Action
             out.println("</body>") ;
             out.println("</html>") ;
             out.flush() ;
-        } catch (IOException ex) { IO.exception(ex) ; }
+        } catch (IOException ex) {
+            IO.exception(ex) ;
+        }
     }
-    
-    public static void backup(DatasetGraph dsg, String backupfile)
-    {
-        if ( ! backupfile.endsWith(".nq") )
-            backupfile = backupfile+".nq" ;
-        
+
+    public static void backup(DatasetGraph dsg, String backupfile) {
+        if ( !backupfile.endsWith(".nq") )
+            backupfile = backupfile + ".nq" ;
+
         OutputStream out = null ;
-        try
-        {
-            if ( true )
-            {
+        try {
+            if ( true ) {
                 // This seems to achive about the same as "gzip -6"
-                // It's not too expensive in elapsed time but it's not zero cost.
+                // It's not too expensive in elapsed time but it's not zero
+                // cost.
                 // GZip, large buffer.
-                out = new FileOutputStream(backupfile+".gz") ;
-                out = new GZIPOutputStream(out, 8*1024) ;
+                out = new FileOutputStream(backupfile + ".gz") ;
+                out = new GZIPOutputStream(out, 8 * 1024) ;
                 out = new BufferedOutputStream(out) ;
-            }
-            else
-            {
+            } else {
                 out = new FileOutputStream(backupfile) ;
                 out = new BufferedOutputStream(out) ;
             }
-            
-            RDFDataMgr.write(out, dsg,Lang.NQUADS) ;
+
+            RDFDataMgr.write(out, dsg, Lang.NQUADS) ;
             out.close() ;
             out = null ;
-        } 
-        catch (FileNotFoundException e)
-        {
-            Log.warn(ActionBackup.class, "File not found: "+backupfile) ;
-            throw new FusekiException("File not found: "+backupfile) ;
-        } 
-        catch (IOException e) { IO.exception(e) ; }
-        finally {
-            try { if (out != null) out.close() ; }
-            catch (IOException e) { /* ignore */ }
+        } catch (FileNotFoundException e) {
+            Log.warn(ActionBackup.class, "File not found: " + backupfile) ;
+            throw new FusekiException("File not found: " + backupfile) ;
+        } catch (IOException e) {
+            IO.exception(e) ;
+        } finally {
+            try {
+                if ( out != null )
+                    out.close() ;
+            } catch (IOException e) { /* ignore */}
         }
     }
 }

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java (original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java Tue Dec 24 18:42:36 2013
@@ -66,6 +66,11 @@ public class FusekiServletContextListene
             initialized = true ;
             Fuseki.init() ;
 
+            if ( initialSetup == null ) {
+                initialSetup = new ServerInitialConfig() ;
+                initialSetup.fusekiConfigFile = "config.ttl" ;
+            }
+            
             if ( initialSetup != null ) {
                 List<DatasetRef> datasets = findDatasets(initialSetup) ;
                 List<DatasetRef> additionalDatasets = FusekiConfig.additional() ;

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java?rev=1553314&r1=1553313&r2=1553314&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java (original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java Tue Dec 24 18:42:36 2013
@@ -20,6 +20,7 @@ package org.apache.jena.fuseki.servlets;
 
 import static java.lang.String.format ;
 import static org.apache.jena.atlas.lib.Lib.equal ;
+import static org.apache.jena.riot.WebContent.* ;
 
 import java.io.IOException ;
 import java.util.HashMap ;
@@ -29,13 +30,11 @@ import javax.servlet.ServletOutputStream
 import javax.servlet.http.HttpServletRequest ;
 import javax.servlet.http.HttpServletResponse ;
 
-import org.apache.commons.lang.StringUtils ;
 import org.apache.jena.atlas.web.AcceptList ;
 import org.apache.jena.atlas.web.MediaType ;
 import org.apache.jena.fuseki.DEF ;
 import org.apache.jena.fuseki.FusekiException ;
 import org.apache.jena.fuseki.conneg.ConNeg ;
-import static org.apache.jena.riot.WebContent.* ;
 import org.apache.jena.web.HttpSC ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
@@ -211,8 +210,8 @@ public class ResponseResultSet
 
             if ( callback != null )
             {
-                callback = StringUtils.replaceChars(callback, "\r", "") ;
-                callback = StringUtils.replaceChars(callback, "\n", "") ;
+                callback = callback.replace("\r", "") ;
+                callback = callback.replace("\n", "") ;
                 out.print(callback) ;
                 out.println("(") ;
             }